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
3
votes
2 answers

What is the correct syntax checking the .readyState of a website in Selenium Python?

I'm trying to check the .readyState of a website using .execute_script but I keep getting an error. I'm using a pageLoadStrategy of "none" in chromedriver so I'm trying to test that the websites readystate is no longer "loading". Note: this…
zao
  • 83
  • 1
  • 1
  • 6
3
votes
1 answer

how to calculate total time for one request from chrome driver PERFORMANCE logs?

I am working on selenium to track network traffic for website. I have followed referred two links: Using Selenium how to get network request http://chromedriver.chromium.org/logging/performance-log I got log data as after configuration. you can…
3
votes
1 answer

org.openqa.selenium.UnsupportedCommandException: Variable Resource Not Found using Selenium

I am using the phantomjs webdriver using selenium protocol to render the webpage.When I try to render the webpage ,I am getting the following error in RemoteWebDriver.get(url) method eventhough my webdriver is running. I have also tried restarting…
3
votes
1 answer

Getting error when instantiating RemoteWebDriver

I am trying to launch chrome browser using RemoteWebDriver with the following code. File file = new File("E:\\S\\chromedriver.exe"); //path to the chromedriver.exe so downloaded //System.setProperty("webdriver.chrome.driver",…
learningQA
  • 115
  • 1
  • 9
3
votes
1 answer

How to extract the ID attribute of a DOM element, if i know corresponding text through Selenium Webdriver and Java

I used following code: driver.getPageSource().contains("My value in text box"); This will let me know, element present in dom or not. Now, i need to know , value containing text-box "My value in text box". What is id of this text box.
3
votes
1 answer

selenium.common.exceptions.WebDriverException: Message: unknown error: arguments[0].click is not a function using execute_script() in Selenium Python

I've check the docs and other forums I haven't found a concrete answer. please find below the code snippet. def click_hamburger_menu(self): _hamburger_menu_ = WebDriverWait(self.driver, 15).until( …
Zilden
  • 31
  • 1
  • 4
3
votes
2 answers

import error: cannot import name 'HTTPError' from urllib3.exceptions

I had a .py file that used to work for web scraping gas prices from gasbuddy using selenium and phantomjs. It used to work, but it stopped all of a sudden. So I uninstalled and reinstalled selenium and phantomJS. I uninstalled and reinstalled Python…
igisan
  • 49
  • 1
  • 3
3
votes
1 answer

Radio buttons (with uppercase 'type' in the HTML) in Watir Firefox Webdriver

I use Firefox 4 with Watir Webdriver. I have a web page with the following: Male Female These really seem standard radio buttons…
carlo.borreo
  • 1,344
  • 2
  • 18
  • 35
3
votes
3 answers

How to monitor a web page and know when a new html element is appeared using Selenium?

I have a web page that sometimes new elements are added dynamically like : | New Login How do i capture when the above code is added to my page ? My code trials: WebDriver driver = new ChromeDriver () ; …
3
votes
3 answers

How to click an element within a table through Selenium Python

I would like to click the cell in the table ID "ContractDesc", "EEE" content: The HTML page: …
TZ J4
  • 33
  • 1
  • 6
3
votes
3 answers

NoSuchElementException: no such element: Unable to locate element while trying to click dropdown element on amazon.co.uk through Selenium

I am running an automated test in selenium/intelliJ/Java. The webdriver is supposed to click the drop down menu on the Amazon nav bar and then click one of the links within the drop down menu. It does both these things correctly, the drop down…
3
votes
2 answers

Selenium: input text in field that hasn't an input tag - how to find which one is it?

I need to input text into a field in a table that doesn't have the input tag. This XPath points out the field uniquely //div[@id="contentBody"]//div[@row="0"]/div[contains(@class, "l4") and contains(@class, "r4")] (one can add a trailing /div to…
user10409695
3
votes
2 answers

Selenium firefox driver forces https

I have a functional app running in a docker on port 3000. I have selenium tests that works when I set my host to http://localhost:3000. I created a container to launch the selenium tests and it fails with the following…
Benoît Latinier
  • 2,062
  • 2
  • 24
  • 36
3
votes
3 answers

What is the best way to scroll to a web element located on the current page within the viewport using Selenium

I am new to the automation and I would like to know how to scroll to a web element on the current page using selenium and java. I have tries many methods which is described in stackoverflow. But couldn't able to solve my problem. Solutions I…
3
votes
1 answer

UnhandledAlertException: unexpected alert open: {Alert text : Save successfully.}

I'm facing below error while handling an alert pop up with Chrome driver in Selenium. Exception in thread "main" org.openqa.selenium.UnhandledAlertException: unexpected alert open: {Alert text : Save successfully.} Scenario: This is happening when…
1 2 3
99
100