Questions tagged [selenium-webdriver]

Used for questions about using Selenium WebDriver, a browser automation framework frequently used to automate testing in a browser.

Filter by
Sorted by
Tagged with
9
votes
5answers
30k views

WebDriver: Can I inject a jQuery script for a page that isn't using jQuery?

Is it possible to inject a jQuery script into a page if the page isn't already using jQuery? We have a few pages in our sites where we don't add jQuery if it doesn't need it, but I'm using it to ...
26
votes
7answers
12k views

Is adding IDs to everything standard practice when using Selenium?

My team is using Selenium WebDriver and the QA team is having the developers add IDs to almost everything. Is that normal or is Selenium flexible enough that tests can be written with the markup that ...
17
votes
7answers
4k views

How do I keep Selenium test cases DRY?

I'm somewhat new to Selenium and I have a problem. Whenever I write a test case, that test case starts with logging in, and it's the same four steps every time. If I change the password for that ...
12
votes
4answers
10k views

What are the best beginner tutorials for Selenium IDE

I have gone through the possible duplicate question,it was related to selenium webdriver . I am new to Selenium IDE tool. Could you please suggest me some best PDFs and sites with Selenium tutorials ...
10
votes
8answers
33k views

WebDriver Clicking button issue in IE 11

Have a suite of web-drivers tests that run in chrome and IE 10, but will not run in IE 11. The tests fail in IE-11 when clicking a button as the following action (a form popup) does not occur. I ...
5
votes
2answers
3k views

Chrome argument “--disable-infobars” does not work with Chrome 65

When I start Chrome by Chromedriver with Selenium, Infobar is not hiddened. Because chrome has updated version 65.x.x.x. Here is my code: [VB.NET] Dim driverService = ChromeDriverService....
12
votes
3answers
46k views

Selenium: How to access the same session in a new window?

I am using selenium webdriver with Java. My test needs to verify when you save your login information and close the browser and reopen it then those credentials remain and are saved on a new session....
8
votes
8answers
5k views

Visual Regression Testing

For testing the visual appearance of a website the use of tools like selenium (functional surface test) are not sufficient because it doesn´t check the visual appearance and/or the CSS-Code directly. ...
8
votes
9answers
52k views

How to verify two images using Selenium WebDriver? [duplicate]

Webdriver does not provide direct any function to image verification, but we can verify images by taking two screenshots of the whole web page using TakeScreenshot WebDriver function, one at script ...
7
votes
5answers
254k views

How to iterate a list of WebElements and print the values one by one to perform some action

List<WebElement> allLinks = driver.findElements(By.xpath("//div[@class='datepicker']/div/table/tbody/tr/td/table/tbody[2]/tr/td[@class='' or @class='datepickerSaturday' or @class='...
6
votes
3answers
20k views

Can't click this checkbox using WebDriver / Selenium — ElementNotVisibleException

See attached image. The element is visible to me as a user, but I keep getting the ElementNotVisibleException error. It seems to locate the element via multiple methods, but the .click() fails. Is it ...
10
votes
2answers
587 views

Detecting complicated CSS selectors

This is a follow-up to What makes a good selenium locator? Motivation I've been thinking about detecting the complexity of CSS selectors statically. The scope I'm working in is both test-automation ...
7
votes
1answer
31k views

Fieldlevel validation in Selenium Webdriver (Java)

how to test validations for "FIRSTNAME" textfield. Below are the details and code. URL: http://www.vrlbus.in/vrl2013/register_customer.aspx Special chars: #!#!#$@#!$@!$@#$%#%^#$^^&%&$%* (...
5
votes
1answer
197 views

Canonical way to define page objects/locators in big enterprise level automation projects?

Background: As automation testers in selenium world, we have to work on multiple languages/frameworks(wrappers over selenium) in different projects however there is an one thing which remains common ...
5
votes
4answers
668 views

Learning myself or getting certified?

I explored following tools: Selenium web-driver, Appium by myself (current company supports me to learn) with help of StackOverflow (you guys) and with my effort. But my question is: is it good ...
3
votes
5answers
24k views

Is there any way to continue selenium web driver script after assert fails?

I have some script which is written with selenium webdriver. Actually, I have put some assert statement in between script. When an assert statement fails my script stops execution. Is there any way ...
2
votes
2answers
29k views

How to open multiple browsers using webdriver?

I want to perform multiple browser testing: While working on a project i needed to open multiple browsers simultaneously using Webdriver script. Does anyone have experience in implementing this ?
10
votes
2answers
3k views

How to avoid flakey E2E selenium tests?

I'm under the impression that most of the E2E selenium tests are flakey. A major reason seems to be timing issues. Another one is that they often test against servers that are not controlled by the ...
9
votes
4answers
415 views

In Page Object pattern, aren't we creating over-specialized methods than generalized re-usable functions?

Background: In the Selenium UI automation we all have been using Page Objects pattern as the "Best Practice" for years. In Page Objects "methods" are tightly coupled to pages instead of generic ...
8
votes
1answer
2k views

PageFactory and nested page objects

In some languages, like Javascript, you can create a hierarchial structure of Elements within a PageObject, like so: class HomePage { loginBox = { usernameTextBox = findElement(By....
6
votes
1answer
6k views

Testing ExtJS UI with WebDriver

Our Web app is using ExtJS framework for rendering UI. However, ExtJS-rendered UI is hard to test automatically because: For most clickable elements, ExtJS uses generated ids like "ext-gen-345" ...
6
votes
5answers
364 views

Test automation | Are we focusing more on automation than testing?

Take a very specified example of web application testing with selenium: It seems obvious that (almost) everyone is suggesting using element ID as the best locator strategy, and that your GUI-...
4
votes
6answers
11k views

How to locate an element which is inside the iframe?

I'm new to automation testing (I'm using TestNG framework and Java language) I'm having trouble in locating an element which is inside iframe. WebElement iframeSwitch= driver.findElement(By.id("...
4
votes
4answers
6k views

Daily tasks/Anything fun & challenging to automate with Selenium? [closed]

I'm currently studying test automation with Selenium and Java. It's very fun, but I have only done basic stuff. I've been thinking about something fun that I can do with selenium, for instance, ...
10
votes
1answer
36k views

Set attribute of an element using webdriver + python

I am trying to automate uploading an image. The uploader is a Flash object and using AutoIt is not an option. So I am trying to work my way around this with just webdriver. The idea is to 'set' the ...
8
votes
2answers
2k views

How to manage application data when running multiple tests in parallel?

Our functional test suite is slow I have inherited a functional test suite using Selenium 2 (Webdriver) and Junit. We have around 500 tests written for our Java web application. Running the full ...
7
votes
3answers
391 views

Structuring Selenium tests to avoid duplication

I'm refactoring our test suite to take advantage of page object pattern. I'm missing how to structure the actual tests. Lets say that I want to test StackOverflow posting and deleting. Once scenario ...
6
votes
4answers
9k views

Running Selenium tests as a scheduled task

I'm trying to run a Selenium WebDriver script written in Python on a Windows 7 64-bit box as a scheduled task. The test works pretty well when run as a batch file from the command prompt, but when ...
6
votes
1answer
2k views

Inconsistent results when capturing javascript errors with WebDriver

I'm using a technique I found here, to capture javascript errors for testing purposes. It's a technique that is frequently recommended on Stack Overflow for those who need to catch JavaScript errors ...
5
votes
4answers
1k views

What to ask programmers before automating with Selenium

What points should I discuss with frontend programmers when preparing a product on which, as a tester, I will use Selenium to automate? I am referring to things like, no dynamic ids for elements etc. ...
5
votes
2answers
17k views

WebDriverWait or ImplicitlyWait or ExplictlyWait nothing works

I'm using Selenium 2 tests (written in C#) that choose values from a "select" control. Selection causes a post-back to the server, which updates the state of the page. I am therefore performing a ...
4
votes
2answers
17k views

Upload a file in Selenium Webdriver using sendKeys

I'd like to side step the dialog box and upload a file using the sendKeys method but it doesn't seem to work. Is anything wrong with the following code? WebDriver driver = new FirefoxDriver(); String ...
4
votes
3answers
6k views

Where I can get all the commands related to Web Driver / Selenium 2?

I am not able to find all the commands for WebDriver / Selenium 2. Where can I get them?
4
votes
3answers
9k views

How to modify HTTP request header in Selenium WebDriver with Java?

I want to add "iv-user" request header to log into web app. I'm using the newest ChromeDriver. Using extensions like ModHeader or ModifyHeaders is not working in this case. Fiddler is working, but I ...
4
votes
2answers
4k views

Code Coverage for Web Applications?

Does anyone have any experience using code coverage tools for web applications? I primarily work with Webdriver and JUnit, but I am not sure if we are covering all the possible cases. This may ...
4
votes
5answers
43k views

How to run all Selenium test cases via batch file [closed]

I am a noob in Java and automation so please bear with me if I get the terminology wrong. I have a class file that can open a browser and navigate to google.com and then closes the browser. There’s ...
4
votes
4answers
365 views

Is there a name for automated tools that work from screenshots like Sikuli or Monkeyrunner with tools like Selenium?

I have a list of GUI testing tools, and I want to separate the tools that are 'based on screenshots' like Sikuli or Monkeyrunner that others that interact directly with the elements of SUT, like ...
3
votes
2answers
1k views

Selenium: Ajax Testing

Please brief me about the Ajax testing with selenium RC. As in Ajax element does not reflect on the view-source, but using firebug we can see the changes in HTML source code. There are two methods ...
3
votes
2answers
2k views

What kind of questions should i ask a Automation Test Engineer candidate and how should i judge him? [duplicate]

I am recently selected in interview panel for Automation Engineers. As i have never taken interviews till now, i am confused about how to judge a candidate? What kind of question should i ask to him ...
2
votes
3answers
5k views

Stress and Load Testing using Selenium-like tool

I have written some tests in Selenium using NodeJs and I am looking for a way to use those tests for stress testing web apps. Is there any tool that combined with selenium can do the trick? What I am ...
2
votes
1answer
4k views

Wait for element change not present (WebDriver/JavaScript/Jest)

Yesterday I struggled with waiting for a loading indicator to be removed. Added this question and answer here because we spend a lot of time on it and Google didn't help much. Hopefully this will help ...
2
votes
3answers
8k views

How to select Security Certificate From security Dialog

The problem I would like to solve is as follow: go to a website which is protected by client certificate authentication using browser once the security challenge dialog box is shown, select on the ...
1
vote
0answers
3k views

Unable to handle Google Authentication pop up window in robot framework test case

I am having a problem on handling google authentication pop up window in robot framework. The process I want to automate is - When a button( Sign in with google) is clicked , google authentication ...
1
vote
1answer
18k views

How to use a regular expression to identify xpath of element with autogenerating id

I need to access this element: <input id ="combo-1105-inputWrap"> The 4 digits in the xpath are autogenerated per browser session. I need to find that particular xpath and key in the data. ...
0
votes
2answers
9k views

Selenium WebDriver and Highchart testing

I know this question has been asked before on S.O. and other websites but I haven't found a definite answer -- most of them say its not easily done but I wanted to make sure that was the final verdict....
13
votes
1answer
4k views

Is Selenium's LoadableComponent a good solution as test design pattern?

I need to refactor my Selenium tests, and come across their LoadableComponent wiki page. I began trying to use it, though I couldn't really understand what is it good for. I took a look at their ...
9
votes
4answers
522 views

How to test the test scripts?

Once an automation test is created, how do I test it and make sure the test does what its supposed to do? I can easily test the scenarios where test passes, but how to go about the ones that fails due ...
9
votes
2answers
3k views

How is Selenium different from other GUI automation tools?

I have used WatiN and WebAii but I have limited experience with Selenium. How does Selenium differ from these other tools?
8
votes
2answers
23k views

Free/Sample Selenium test suites (code) for Open Source projects

I am a student and for learning purpose I am looking for following: Open source projects who have a ready-made selenium test-suite, free for others to use: can be any sort of web application, in ...
7
votes
3answers
5k views

Cypress vs Protractor for end-to-end testing

I've recently stumbled upon a modern end-to-end testing framework called Cypress which is going to be released in public beta this year. It really looks awesome at the first glance - there are ...