Selenium is a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language (Selenium IDE). It also provides a test domain-specific language (Selenese) to write tests in a number of popular programming languages, including C#, Groovy, Java, Perl, PHP, Python, Ruby and Scala. The tests can then be run against most modern web browsers. Selenium deploys on Windows, Linux, and OS X platforms. It is open-source software, released under the Apache 2.0 license, and can be downloaded and used without charge.

Share tech news, updates, or what's on your mind.

Sign up to Post

I am recording multiple tests using selenium ide, but would like to be able to play the recorded files using selenium webdriver in C#. I would like to use webdriver to be able to take screenshots and do other things in between the steps.

I started with a selenium webdriver, where I defined and created the actions for the different commands form selenium ide that I want to support. However, now I have to add some new commands and I'm wondering if I could do this much easier.

I have 2 different questions regarding the running of selenium ide tests using selenium webdriver:

1. Is it possible to call selenium ide from selenium webdriver? So I would like to play the whole test using selenium webdriver, but want to call selenium ide for every command/step that I want to take in the website.

2. Can I export all possible selenium ide commands, so I can use the definition of these commands within selenium webdriver. The commands that I support in selenium webdriver at the moment are all added to my code, but is there an easier way to get all selenium ide commands with the corresponding code to execute the command?
Ensure you’re charging the right price for your IT
Ensure you’re charging the right price for your IT

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden using our free interactive tool and use it to determine the right price for your IT services. Start calculating Now!

I need to log into Cisco's serial number check periodically to make sure that a given device is covered. (Their API does not have maintenance contract data.) So I am trying to use Selenium and Python to log into my Cisco account and navigate to the upload page. I've pasted in the code, it works . . . .sometimes and throws an error: "TypError: rect is undefine" other times. I cannot figure out why it works, why it fails and it appears to be random.

Here's the code I am using (Windows 10, Python 3.7.1, Selenium 3.141.59):

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from import By
from import WebDriverWait
from import expected_conditions as EC
from import Select
from selenium.webdriver.common.action_chains import ActionChains

driver = webdriver.Firefox(executable_path="C:\\work\\selenium\\geckodriver.exe")

assert "" in driver.title

wait = WebDriverWait(driver,10).until(EC.url_changes(""))
elem = driver.find_element_by_name("pf.username")

def move_to_element(self, locater, *args, **kwargs):
    if (self.browser_type == 'firefox' and self.browser_version >= 60 and 'rect is undefined' in e.msg):

actions = ActionChains(driver)


Open in new window

Hi Experts!

Trying to create a Selenium test class (MSTest) in C#. Would like the browser to fire up only once before we run all tests from Test Explorer,
so that for each test method it would be able to use the same browser.

Running the following code below we have this error:
SetupToRunOnceBeforeAllTestsRun has wrong signature. The method must be static, public, does not return a value and should take a single parameter of type TestContext. Additionally, if you are using async-await in method then return-type must be Task.

    public class SearchPageTest : BasePageTest

        private SearchPage searchPage { get; private set; }
        private SearchCriteria searchCriteria;

        public void SetupToRunOnceBeforeAllTestsRun(TestContext context)
            driver = GetChromeDriver();
            searchPage = new SearchPage(driver);

        [TestCategory("IntegrationAutomation"), TestCategory("UI"), TestCategory("SearchPage")]
        public void SearchPage_GoToSearchPage_Success()

        [TestCategory("IntegrationAutomation"), TestCategory("UI"), TestCategory("SearchPage")]
        public void SearchPage_SomeOtherTest_Success()

Open in new window

I am attempting to scrape the following URL:

Using the Network tab in Chrome's developer tools, you can see there is an API that feeds the data into the website - which is in the form of a JSON - and looks as below. This data is what I am trying to scrape.

This is the code I am currently trying to scrape this with:

from import Options
import json
import urllib.parse
from time import time

options = Options()
options.headless = True
driver = webdriver.Chrome(options=options)

# Access the initial webpage to create the info_dict (including the match_id, and hash)
page = driver.page_source
info_dict = json.loads(page.split('var page = new PageEvent(')[-1].split(');')[0])
xhash = urllib.parse.unquote(info_dict['xhash'])
match_id = info_dict['id']

# Access to the feed URL based on the values from the info_dict
driver.get('{}-1-2-{}.dat?_={}'.format(match_id, xhash, int(round(time()*1000)) + 1000))

Open in new window

The URL is built up of 3 factors - the match_id, the hash, and epoch time in milliseconds. However, when I try to access this in Selenium, I get the following response:

globals.jsonpCallback('/feed/match/1-1-4IMoMG3q-1-2-yjb3a.dat?_=1562795864899', {'e':'404'})

Open in new window

Would really appreciate any help with this, as I don't really understand where I'm going wrong!

I am looking for a best practice to maintain locators in selenium project, i have multiple e-commerce websites which are almost similar but there are minor changes based on the customer so i am looking to maintain them in centralized location and refer to them.

For example in the credit card payment page one customer will have captcha and the other will not, in the similar way for purchasing products one customer is allowing to use vouchers and other is not

I am using pageobjectmodel and creating a class for each web page to perform test on the web elements.

Please share if there are any examples of similar kind.

I am totally new to selenium, hope i framed my question understandable to everyone
I am trying to understand how to test a very simple web page generated by Polymer (a Javascript Framework).

The task is really simple and I need to use Selenium Webdriver with Javascript to write the username in username input field, the password in the password field and click on login button.

Problem is that in the generated html code I see several nested shadowRoot sections.

I am able to get to the 1st shadowRoot using:
var myApp = document.getElementsByTagName("my-app");

But every element I try to select after that returns just undefined (using css or other methods).

If I inspect the element I see (I've clearly simplified the code for readability):
					<input required id="password">

Open in new window

How should I proceed to complete this task?

Any pointer is very welcome and appreciated.
I am running a cucumber test suite using Jenkins

I am finding that if my test suite launches in multiple servers concurrently that test on server A may cause test on server B to fail because it’s changing database settings that should be blocked from modification until a given test has finished running

Is there a way to lock resources or block tests from running until it’s their turn to enter the critical zone to avoid this conflict?

Any assistance appreciated
Using selenium i should be able to validate data that is populated in a web table which is generated using Div's, it is basically a React table

I am a beginner in Selenium

here is the Html code for the web table generated, the divs are 4 level nested and at the last level it has got 3 child div's

Please see the attachment for how the table looks like

Collapsed HTML Code  


<div class="content">
    <div style="width: 100%; min-width: 1094px;">
        <div class="ReactTable -highlight">
            <div class="rt-table" role="grid">
                  <div class="rt-thead -headerGroups" style="min-width: 700px;">
                 <div class="rt-thead -header" style="min-width: 700px;">
               <div class="rt-tbody" style="min-width: 700px;">

Open in new window

Complete expanded code React Table


<div class="content">
    <div style="width: 100%; min-width: 1094px;">
        <div class="ReactTable -highlight">
            <div class="rt-table" role="grid">
                <div class="rt-thead -headerGroups" style="min-width: 700px;">
                    <div class="rt-tr" role="row">
                        <div class="rt-th" role="columnheader" tabindex="-1" style="flex: 200 0 auto; width: 200px;"></div>

Open in new window

Hi Team,

I am trying to implement the selenium headless browser test using the phantom js.
Here am able to connect to the endpoint and able to fill the login details but getting the error message after clicking on the submit button.
Error Message:- This part of the site is not reachable.

Am able to do the above operation using the firefox driver and all other web drivers expect headless browsers.

Selenium-java version:- 3.7.1
Phantom Js driver:- 2.1.1
Phantom js pom version:- 1.4.0

Can any help me to solbve this issue.
I am new to Automation testing, i have to write automation scripts for File Router service, this service has a source/input folder and a destination folder, based on the file name, extension the file(s) will be moved to respective destination.

This is a windows service. based on the configuration this router will move the files

What will be better technology stack for this requirement, when i run the tests , they should be able to copy, verify whether it is copied or not
Become a Certified Penetration Testing Engineer
LVL 19
Become a Certified Penetration Testing Engineer

This CPTE Certified Penetration Testing Engineer course covers everything you need to know about becoming a Certified Penetration Testing Engineer. Career Path: Professional roles include Ethical Hackers, Security Consultants, System Administrators, and Chief Security Officers.

Hey all I am using RFT in order to automate a page on a Pega website page. However, the automation doesn't seem to be able to fire off the change event of the input that I am inserting a string of text into. This input box seems to be located inside an iframe and perhaps this is the reason why its not firing the onchange event when losing focus on that input box?

RFT does use Selenium in their program to interact with the web page.

The html of the input box:


Open in new window

The Selenium code I have tried is this:


WebDriverWait wait = new WebDriverWait(driver, 10);
final WebElement BBOXInputBox = driver.findElement("BBOX"));;;

Actions builder = new Actions(driver);
builder.moveToElement(driver.findElement("FirstName_U")), 5, 5).click().build().perform();


Open in new window

And I am trying my best to find this function above in their 30 or so of .js files for any one page.

So someone more knowledgeable than I in the area of this type of coding in JS please set up and let me know what I should be looking for in the .js source code so that I can fire this change event manually within code.

It seems when I click on the text box, input a few letters and then either tab or click on another input box on that same form it fires some type of event/function that populates a label on the page.

What I have been looking for within the .js source code would be a function called refresh(...) or something along the lines of refresh: function(...)... or _refresh: function(...)... but I haven't been able to find anything that resembles the parameters its sending to that function.

Kindly guide me for control v keys (paste) for selenium web driver for Chrome i use following Combinations and Searched Over Internet Various Ways but vain.
sendkeys keys.control + "v"
sendkeys Keys.control&"v"
sendkeys Keys.control,"v"

I use VBA Excel to Excute copy a range from sheet to paste into a contact everything working but control + v paste not working.

After installing Selenium IDE in Windows 10, the system is getting Auto-off !
I have wrote a python script to open arround 1k urls and process them to get the desired result,but it seems like eventhough multithreading has been introduced its working slowly, and after some urls have been processed,the process seems to be hanged, I am not able to decide whether its still running or stopped.How can I create multiple threads to process them faster.Any help will be highly appreciated.Thanks in Advance. Below is my script.

import threading
from multiprocessing.pool import ThreadPool
from selenium import webdriver
from selenium.webdriver.phantomjs.service import Service
from selenium.webdriver.common.desired_capabilities import
from selenium.webdriver.remote.webdriver import WebDriver as
from multiprocessing.dummy import Pool  # This is a thread-based Pool
from multiprocessing import cpu_count
import csv

def fetch_url(url):
    driver = webdriver.PhantomJS()
    html = driver.page_source
    print("'%s\' fetched in %ss" % (url[0], (time.time() - start)))

def thread_task(lock,data_set):

if __name__ == "__main__":
    data_set = []
    with open('file.csv', 'r') as csvfile:
        spamreader = csv.reader(csvfile, delimiter=' ', quotechar='|')
        for row in spamreader:

    lock = threading.Lock()
    # data set will contain a list of 1k urls
    for url in…
I want to automate a task. in a website we give the details in the fields (like 10 fields information need to fill) and click on submit and in the next page we need to confirm and proceed. Depending on the result whether it is success or not, capture the result and send via email or put the result in a different website and save the result in that website.

Also this process of checking information in site1 by giving information in fields and saving it in a different website need to be done at a scheduled time daily or on days we select to run this job.

I want to know to achieve this task, which method/tools can be used with using robust tools that does not require licensing requirement. Please guide me how to proceed with this task.
from selenium import webdriver
text=str('good day ')

This works fine , but when i use xpath

I am getting Error . Kindly anyone help me with this
Hi there!

I have an issue preparing an installation of Python/IDLE in one of my client's team computers. Basically, I prepared a couple of scrappers using Python and Selenium. The packages being used on my scripts are selenium, openpyxl, and python-docx.
However, I can't even get to installing the packages on that machine, because one I execute the Python installer from the website (3.6.x), the insteller won't. I tried using admin rights, disabling antivirus, I checked the correct processor architecture, and I still can't get to run the installer on that particular machine. In other team members I was able to installe in their machines. I have run out of ideas to trouble shoot this. Could you please point me to things that I can try out to run the installer Python/IDLE installer?

Thank you so much!
Any help is greatly appreciate it.

This about automating the Application verification.

As part of testing we are verifying some online application every day and seeing the response at the end and confirming that the application working as expected.

Cant we automate this process. If we did that it will reduce 30 mints of our time. Also if this can be done from the UFT tool also fine for me. we dont have selenium in our machine and it is not allowed. Please share your thougths and suggestions if any.
What are steps to install selenium automation in robot framework in ubuntu 16.04 in python?
Why Diversity in Tech Matters
LVL 19
Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

I am using Log4j2 with the JUL plug-in.

For example:
	... 18 more
1500642924477	Marionette	INFO	New connections will no longer be accepted
1500642924501	addons.xpi	DEBUG	Calling bootstrap method shutdown on version 1.1

Open in new window

We are using ELK(Elastic search, logstash, and Kibana) for our log management. Everytime I will export the setting from kibana UI from Management--->Save Objects--->Export Everything. For demo, one can checkout the url: Kibana Demo

I want to automate this export process with some scripting on linux. I tried CURL but the header/payload data looks to be dynamic and might have to update frequently. I want to try some web scraping techniques with some web automation tools like Selenium and pythion.

Selenium Webdriver
I tried to record this export action with Selenium IDE and from the IDE I exported the test plan/case into . As we click on Export Everything button on Kibana, a firefox window opens asking where to save. This action is not handled by selenium, meaning download file is not supported by selenium.

So, I'm looking for some scripting to export the json(Export Everything) file from Kibana UI and it mush be Headless as I would be scheduling this script in linux server. To be headless, I also tried phantomjs, but even this doesn't support file download.

Simply, I just want a script to automate clicking export everything button on kibana and want it be saved in a file. Please share your thoughts or any idea,  i'm trying this for days...
public class test {

public static void main(String[] args) throws AWTException, IOException, InterruptedException {
       WebDriver driver;
            driver=new InternetExplorerDriver();

      driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);

       WebDriverWait waiting = new WebDriverWait(driver, 10);
      driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);



      try {
             Robot robot = new Robot();
                 } catch (AWTException e) {



The requirement is:
open a webpage
Click on the excel icon to download the file.
then a popup appears.
upon clicking on F6 and enter the file gets saved.
the problem here is as soon the code is run, the robot class does not wait for the icon to be clicked. the steps are not occurring in sequence.


Selenium is a portable software testing framework for web applications. Selenium provides a record/playback tool for authoring tests without learning a test scripting language (Selenium IDE). It also provides a test domain-specific language (Selenese) to write tests in a number of popular programming languages, including C#, Groovy, Java, Perl, PHP, Python, Ruby and Scala. The tests can then be run against most modern web browsers. Selenium deploys on Windows, Linux, and OS X platforms. It is open-source software, released under the Apache 2.0 license, and can be downloaded and used without charge.

Top Experts In