Questions tagged [webdriver]

Questions relating to automated tests using WebDriver, a tool created to interact with browser HTML. WebDriver has been merged into Selenium 2, so WebDriver and Selenium 2 questions are appropriate for the WebDriver tag.

WebDriver is a tool for writing automated tests of websites. It was originally created by Simon Stewart.

WebDriver aims to mimic the behavior of a real user, and as such interacts with the HTML of the application. Rather than running as a JavaScript application within the browser (with the limitations this brings, such as the "same origin" problem), WebDriver controls the browser itself. This means that it can take advantage of any facilities offered by the native platform.

The WebDriver code base has been merged into the Selenium code base as of Selenium 2.

515 questions
11
votes
5 answers

How can I switch to new window using webdriver?

I have clicked an image in a slide show and it generates a new window. Once the window opens I need to bring focus on new window and do some stuff. I have attached my code below, but it is not successful. @Test public void testCreateAccount() throws…
Pramod
  • 583
  • 1
  • 5
  • 18
6
votes
4 answers

How can I restart the browser in the middle of a test?

I need to verify some functionality around present the user with the option to pick up where they left off when they return to the site after having abandoned their cart. How can I close the browser and start it again in the middle of the test case…
Yamikuronue
  • 3,372
  • 4
  • 21
  • 45
6
votes
3 answers

How to send an Enter using webdriverio?

var webdriverio = require('webdriverio'); var options = { desiredCapabilities: { browserName: 'firefox' } }; webdriverio .remote(options) .init() .url('http://google.com') .setValue('.gsfi',…
030
  • 201
  • 1
  • 2
  • 6
5
votes
4 answers

Ctrl+Click using WebDriver

There is a similar question concerning Watir-WebDriver. What is the best way to do Ctrl+click on a DOM element?
Randomblue
  • 471
  • 2
  • 6
  • 12
4
votes
2 answers

Asserting a checkbox is not checked by default in WebDriver with Junit

I'm using WebDriver with Junit 4.11 and I want to assert that a checkbox is not selected by default, and to do that I'm unsure which method to choose. The following is from the DOM before the checkbox is selected:
Django_Tester
  • 173
  • 4
  • 7
  • 17
3
votes
3 answers

Cannot click link inside div?

I'm using webdriver, and I have the following html (sanitized): In Chrome, when my page object tries to do linkID.click(), I'm getting…
Yamikuronue
  • 3,372
  • 4
  • 21
  • 45
3
votes
4 answers

Can not catch NoSuchElementException with PageFactory (Selenium WebDriver)

My question is like Problem catching Selenium Webdriver NoSuchElementException but there is no answer to resolve an issue. Class SmallLoginLocators: public class SmallLoginLocators { public final String PASSWORD1 = "__nothing"; public final…
hermes
  • 31
  • 1
  • 2
3
votes
3 answers

Going past the Chrome security warning

I'm trying to test a page without a security certificate, which Chrome flags up. This blocks my tests. (I have to manually click "Proceed anyway". Is there a way to disable this warning?
Randomblue
  • 471
  • 2
  • 6
  • 12
3
votes
3 answers

Why does WebDriver click an unrelated button in the wrong frame?

I have, in part, the following html structure: [other menu buttons] ORDER CENTER [other menu buttons]