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
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
8k views

Automate verification of emails being received

One of the applications that I have to do an enhancement to soon has a number of emails that are sent from the application. To the point of verification, I need to see the delivery failure ...
7
votes
2answers
47k views

Navigate to previous page using Selenium

I know there's a driver.navigate().back() but that's not what I'm looking for. Let's say a user is on PageA, they click on a submit button which takes them to a submit page. On that page, there are ...
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 ...
6
votes
4answers
7k views

Do you verify presence of text in your automated tests?

While automating multi locale application I had to stop using - assertTrue(selenium.isTextPresent("success text message")); where success text message would change for each locale. to - assertTrue(...
6
votes
1answer
55k views

How to switch-handle-close particular popup window, When multiple popups are opened?

I know how to switch to single popup window, but I do not know how to switch particular popup window when you have more popup windows. Scenario is: Go to the each and every popup Get the title ...
6
votes
5answers
334 views

Balancing readability and reliability in end-to-end testing

One of the things that often helps to make tests more reliable and to reduce flakiness is Explicit Waits - waiting for an element to be visible or clickable before interacting with it, waiting for a ...
5
votes
2answers
3k views

Cloud Based Automation Testing with Selenium WebDriver - Java

I am beginner in selenium webdriver (java), and wanted to know whether selenium webdriver can be used in cloud based application testing or not, if yes how to setup it (Searched over the net but didn'...
5
votes
3answers
6k views

Advanced selenium webdriver tutorial/course [duplicate]

Is there an online advanced/intermediate tutorial on Selenium Webdriver. Preferably using Java. I've searched a lot but could not find such a course/tutorial. Almost 99% are very basic, and I would ...
5
votes
4answers
3k views

What to do when waiting for an element to appear isn't enough?

I am writing selenium tests, and following the convention of using Webdriver Waits to have the webdriver poll for an object before it tries to interact with it. I am frequently finding my tests are ...
4
votes
1answer
21k views

how to handle if xpath is same for multiple drop down

I have a situation where i had to handle drop down and click the drop down to select some values. There are two drop down in same page and both has same xpath. The Xpath is giving below. //div[@name=...
4
votes
1answer
1k views

Selenium (RC) hangs when started from Python test

Fairly new to Selenium (but loving it). I'm running a single test in Python on Selenium RC. I've been running it multiple times a day for about 3 weeks. Now when I try to run it, it executes all the ...
3
votes
4answers
23k views

Click submenu which is dynamicly visible in Selenium WebDriver

In my scenario, I need to click the submenu that's only visible when its parent menu is in 'mouse over' status: MainMenu (button) SubMenu of MainMenu (span) SubMenu of SubMenu of MainMenu (span) ...
3
votes
2answers
6k views

How to navigate to a alert using Selenium Web Driver with Java?

I am trying to navigate the command on the alert box, but I am not able to do it in Web Driver with JAVA. Please help me with it. Apart from this I would also like to know how to tackle with the ...
3
votes
3answers
14k views

Why this “WebDriver driver = new ChromeDriver();” Not this “ChromeDriver driver= new ChromeDriver();”

Why we always do: WebDriver driver = new ChromeDriver(); Not this: ChromeDriver driver= new ChromeDriver(); Any special reason, except object size ?
3
votes
1answer
5k views

Selenium WebDriver (Java) with database [closed]

I want to validate application output result with Database using selenium webdriver (Java). Please let me know how this can be achieved. Or could you please let me know how to use selenium webdriver ...
2
votes
3answers
32k views

Verifying if an image Is displayed on a webpage

I have read that there is no "sure shot" way of knowing that an image is loaded or displayed on a webpage using Selenium. I want to know the reason behind it, as to why this is completely not possible....
2
votes
3answers
178 views

How should ImplicitWaits be removed without resulting in code bloat?

Refrence: Speeding up end-to-end tests I tried removing ImplicitWaits and I found myself ending up writing too much code for every click and sendkeys etc. I have to put wait condition for every base ...
2
votes
3answers
3k views

How to reuse existing browser session, instead of opening new windows?

I have a feature file which has many scenarios. When I run, every time it's initializing the new browser.It's performing every scenario in the new browser. I am using @before and @after @Before ...
2
votes
4answers
5k views

Selenium, monitor network, captureNetworkTraffic command not available [duplicate]

I need to know if an application is requesting one beacon via an image or XHR request. Manually I test it via the network tab in FireBug or monitoring the proxied requests in other browsers... ...
2
votes
7answers
7k views

How to find the xpath locator for logout button?

We are currently working on a selenium project. Can you guys help me to find the xpath locator for the logout button in the application? Below is a screenshot of the code for the element for which I'...
2
votes
1answer
2k views

Choosing framework type for selenium RC/Webdriver

I had opportunity to work in around 3 different projects, where selenium have been used extensively. Among them 2 were based on Data driven (say test cases driven by testng XML for each scenario with ...
2
votes
4answers
15k views

How to work with changing element id in the html code [duplicate]

I am working in a ERP where the elements id are changing/rotating randomly. so if I am writing a code to locate a id, next time I run the selenium code it gets me error as the id changes by that time ...
2
votes
1answer
6k views

Selenium IDE Store variable in Javascript of Page

I am attempting to inject Javascript directly into a page in order to set a variable for the page. I am still rather new to the IDE and I have seen the runScript function and I think it does what I ...
1
vote
3answers
225 views

Webdriver auto-filtering results

Navigate to the custom elements example, open a console and type in document.body.getElementsByTagName("*").length - you should get 6 returned as the result. Using webdriver, try (def d (execute-...
1
vote
2answers
2k views

Effective way to deliver automation script to client?

I am QA automation engineer. We have so many clients for whom we are doing web scraping. We automate their daily task to save their time and resource. Every client demands that they should able to ...
1
vote
1answer
387 views

Can I create an executable TestNG Selenium jar with my tests using maven

##### My POM file pom.xml http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0 company.myproj myproj 0.0.1 jar <properties> <project.build.sourceEncoding>UTF-8</project....
1
vote
0answers
1k views

Handling Alert box on page load [closed]

Is there any way to identify the JavaScript alert box (on page load) in selenium IDE? I used commands like "storAlert", "assertAlert" etc. But selenium not identifying alert box.
1
vote
0answers
11k views

Using Allure framework with Selenium webdriver tests for better reporting. [closed]

I am using Selenium webdriver for automation. I have around 200 scripts ready and now i need a good reporting tool to generate reports. I recently heard about Allure framework, which is an open source ...
0
votes
1answer
2k views

Selenium IDE If-Else logic problem

I have a problem with Selenium IDE If-Else processing. My script is ignoring the logic and running both the If and the Else. I want the script to check whether I have a single item or a group in my ...
0
votes
3answers
12k views

ElementNotVisibleException: Message: element not visible

I've seen this error everywhere, but none of the solutions have seemed to work. This is my code: contpayment = driver.find_element_by_class_name('nsg-bg--nike-orange') contpayment.click() Python/...
0
votes
2answers
76 views

What are the things that one must consider while learning Selenium Webdriver Automation framework?

I am a newbie in Automated scripting using Selenium WebDriver with Java. Also, i have the most basic knowledge of core Java. With tons of resources on the web for learning WebDriver, i am a bit ...
0
votes
4answers
3k views

How to Incorporate the Defunct PageFactory in Selenium with C#?

I just discovered the page object design pattern recently and really wanted to implement it into my company's UI Test Automation suite. I started to do so and immediately ran into problems which lead ...
9
votes
3answers
758 views

Where tools for automated UI test like selenium or Coded UI fits in Dev Ops cycle

My manager asked me to look into how we can utilize automated UI testing to gain productivity and help testers automate basic functionality of the system. I developed few test suites and cases using ...
6
votes
6answers
58k views

WebDriver API: 'Failed to send keys because cannot focus element' — better workaround than using Firefox instead of Chrome?

There's a bug in the chromedriver.exe Chrome driver for Selenium's WebDriver API. You can't use send_keys for certain types of inputs, like for the jQuery plugin "EZPZ Hint". It works okay on simple ...
6
votes
1answer
17k views

Selenium: getPageSource() returns previous pages' source

I'm logging into the page using this function: public static void login() { driver.get(url); driver.findElement(By.name("username")).clear(); driver.findElement(By.name("...
6
votes
3answers
676 views

Is page object a framework or design pattern?

Currently I'm using page object design pattern with testing.
5
votes
2answers
16k views

Problem catching Selenium Webdriver NoSuchElementException

I have many test cases written in C# using Selenium2 Webdriver with NUnit. I have a problem that when a NoSuchElementException is thrown, it is treated as an unhandled exception despite me using a ...
5
votes
2answers
410 views

Matching images in Selenium2

Not sure if I'm even asking this question correctly, however, here goes. I'm looking at validating images in an automation suite that I just started. I am currently validating the location via XPath ...
5
votes
5answers
62k views

Locating element by link text (anchor tag innerHTML) or xpath fails in Selenium 2.0 Webdriver

I'm using Selenium 2.0 web driver. My script keeps failing whenever I try locating something in my page. It throws an exception whether I locate the element by LinkText or by XPath. driver....
5
votes
2answers
19k views

Selenium - Find exact text match using CSS locators

According to A way to match on text using CSS locators, we should be able to use "^$" to find exact text match using CSS locators. But with: <div class="item"><div class="text">Trouble&...
5
votes
4answers
13k views

Running Selenium test on TFS

I am currently working on implementing UI tests of .NET web application using Selenium RC. The tests are now coming together and I am beginning to look at how these will be incorporated into TFS. ...
5
votes
5answers
8k views

What kind of test cases can we not automate in selenium webdriver - java [closed]

I want to know what kind of test cases we cannot automate using selenium webdriver. I do not want to use any 3rd party tool (Autoit, etc..) What are the limitations of Selenium WebDriver?
4
votes
1answer
267 views

What bugs cannot be found with PhantomJS?

How credible is testing performed with PhantomJS WebDriver? What are types and examples of bugs that can be found with Chrome or Safari that cannot be found with PhantomJS? PhantomJS is a scripted, ...
4
votes
2answers
758 views

Headless browser testing using X virtual frame buffer

My current setup is using Jenkins as my CI environment, which has some ubuntu server nodes to execute the end to end browser tests on some amazon EC2 machines using selenium 2. I am wondering if ...
4
votes
2answers
12k views

How and where to store dynamic result/data using webdriver java

I want to know "How and where to store dynamic (Search results) result/data", I am getting the results and not sure what to do next. Also, after saving these results I want to use this in another ...
3
votes
1answer
853 views

Is Fitnesse only used as a acceptance test tool based on integration testing?

I have read a lot about Fitnesse over the last week. From what I have heard, Fitnesse is commonly used as an acceptance testing tool that relies on a set of integration tests, as mentioned at Agile ...
3
votes
4answers
25k views

Webdriver Firefox “Element could not be scrolled into view”

I am facing this problem on Firefox v.59, Selenium 3.11.0. I just click on an element, like this: webDriver.findElement(By.id("row_0")).click(); and I get exception: org.openqa.selenium....
3
votes
3answers
13k views

How to identify element with knowledge of partial text for any tag (eg. div,span etc.) contains?

My source goes like this: <div name="something" id="something"....>IPS125</div> the number after IPS always changes. So I need to give the identification attribute as partial text "IPS". ...