Questions tagged [webdriver]

WebDriver is an API for controlling web browsers, imitating a real user. It's mostly used for automated tests. WebDriver has multiple language bindings and drivers (allowing to control various browsers). If your question is specific to one of them, make sure to also include the appropriate tag.

WebDriver is an API that allows programs or scripts to introspect into, and control the behavior of, a web browser. It is primarily intended for allowing tests that automate a browser.

The WebDriver API is implemented, natively or via add-ons, for many browsers. The Selenium tools suite provides several WebDriver implementations, e.g. for Firefox or Internet Explorer. Other WebDriver implementations are developed by the browser projects directly, e.g. ChromeDriver for Chrome, or Ghost Driver for PhantomJS.

The WebDriver API specifies a wire protocol which is used for the communication between a WebDriver client and the browser. Clients do not speak the wire protocol directly, they use "language bindings" of the WebDriver API for the respective programming language. The wire protocol is used by the Selenium Grid to pass API commands across network.

There are language bindings of the WebDriver API for Java, C#, Python, Ruby, Perl, PHP, JavaScript, and other languages. Many of the language bindings are provided by the Selenium project. For some languages, there are even multiple language bindings, e.g. WebDriverJs by Selenium and WebdriverJS by webdriver.io.


Reference Links

12238 questions
47
votes
8 answers

How to search node by exact text match using Xpath in webdriver

I need a little help regarding searching an exact text using xpath in webDriver. Suppose i have the html as follows.. …
souvik
  • 501
  • 1
  • 5
  • 10
46
votes
8 answers

How do I set the selenium webdriver get timeout?

When I am using a proxy in webdriver like FirefoxDriver, if the proxy is bad then the get method will block forever. I set some timeout parameters, but this did not work out. This is my code: FirefoxProfile profile = new…
福气鱼
  • 1,189
  • 2
  • 10
  • 13
46
votes
2 answers

Cucumber and Capybara, clicking a non-link or button element

I am trying to test an inplace editor using Cucumber/Capybara/Selenium stack, but my problem is that the editor is activated by clicking a div and not a link or button. I can not seem to figure out how to get Capybara to do this. Is there a way of…
trobrock
  • 46,549
  • 11
  • 40
  • 46
46
votes
17 answers

How can I select checkboxes using the Selenium Java WebDriver?

How can I check the checkboxes using an id or XPath expression? Is there a method similar to select by visibletext for a dropdown? Going through the examples given for all other related questions, I could not find a proper solution that works in a…
Maximus
  • 625
  • 1
  • 7
  • 10
45
votes
5 answers

org.openqa.selenium.ElementNotInteractableException: Element is not reachable by keyboard: while sending text to FirstName field in Facebook

The error is: Exception in thread "main" org.openqa.selenium.ElementNotInteractableException: Element is not reachable by keyboard The code…
Rozmeen
  • 479
  • 1
  • 6
  • 10
45
votes
3 answers

Switch to an iframe through Selenium and python

How would I switch to this iframe in selenium knowing only