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
0 answers

Java Selenium WebDriverWait waits longer than specified wait

I don't understand what's happening with the newer version of Selenium's WebDriverWait but as far as I can see, it's not behaving the way I'd expect it to. I have tried all the versions from 4.0.0-beta-1 - 4.0.0-beta-4 and I have just updated to…
3
votes
1 answer

How to use proxies with Firefox geckodriver?

I am trying to set some proxies using the Firefox webdriver geckodriver, but it keeps throwing this error InvalidArgumentError: Since Firefox 90 'ftpProxy' is no longer supported. I've tried many different things, in this one the code break throwing…
3
votes
1 answer

Python Selenium - Wait until an element is visible

I know about the solution with elem = WebDriverWait(browser, 20).until(EC.presence_of_element_located((By.CSS_SELECTOR, ".reply-button"))).click() But here you would wait 20 seconds and then it would either load the element in a variable or throw an…
Wrench56
  • 290
  • 2
  • 14
3
votes
1 answer

selenium-webdriver: The geckodriver executable could not be found on the current PATH

I installed the selenium webdriver using the following command: $ npm i selenium-webdriver Then, I created the directory D:\WebDriver\bin (and added the files geckodriver.exe and operadriver.exe to that directory) and added it to the system's PATH…
Husky
  • 71
  • 1
  • 7
3
votes
0 answers

How to save and load all cookies using Java + Selenium WebDriver

How can I save all cookies (from all domains, not just the current domain) in Java's Selenium WebDriver to a .txt file, and then load all of them when I restore Selenium session? driver.manage().getCookies() only returns cookies from the current…
S.O.S
  • 848
  • 10
  • 30
3
votes
1 answer

Selenium/webdriver network monitoring

I am looking for a way to monitor and record all requests that a browser makes while being used by selenium/webdriver to test a page. Something like the network pane in chrome developer tools.
Daniel Iankov
  • 306
  • 3
  • 7
3
votes
0 answers

Is it a bug: Python's Selenium ActionChains, strange delay between with the 'perform' function?

I am writing in Python with Selenium's WebDrivers a function to click a coordinate in a page in a human-like fashion. It uses Firefox, but I also notice the same problem with ChromeDriver. It takes two arguments: an element (from which my function…
3
votes
5 answers

python selenium webdriver safari driver

Quick question, I've been building a python selenium framework for testing our site. I have successfully implemented Firefox, Chrome and IE for browser testing. But have been searching for Safari driver. I know in the official documents it briefly…
hackthisjay
  • 177
  • 4
  • 22
3
votes
2 answers

Selenium Python get data from HTTP request

I am running automation with Selenium and Python on Opera web driver, when I enter the specific page that I need, a request is sent to the server, it is authenticated with anti-content which blocks me from requesting it, then the only solution is to…
Evara
  • 75
  • 8
3
votes
1 answer

Selenium: FirefoxProfile fails with not found exception

I've the following code, though I set the profile_directory Firefox webdriver still attempts to store setting within the /tmp folder profile = FirefoxProfile(profile_directory = '/home/sultan/profiles') profile.set_preference('network.proxy.http',…
sultan
  • 5,978
  • 14
  • 59
  • 103
3
votes
0 answers

ssl_client_socket_impl.cc(962) handshake failed

i'm trying to run my project(that I written it on my macBook) on my windows server.it use selenium and chrome web driver -v 87 when its run it opens web driver and start browsing and clicking but it doesn't catch anything and just print a writing…
Alora
  • 761
  • 1
  • 5
  • 12
3
votes
3 answers

Would it be the right approach to close and open a new WebDriver session between negative tests in Selenium?

I close my driver and reopen it between each negative test, for example - in my negative login test - if the test failed it means the login succeeded, then I close the driver and open it again so I start from a fresh browser in the login page…
amitlisha
  • 140
  • 1
  • 8
3
votes
0 answers

Selenium won't open specific chrome profile python

I have a chrome profile (called Profile 1) which I would like to control with Selenium. Whenever I try to open that chrome profile, Chrome opens without my profile, like it was my very first time opening Chrome. My code is the following: options =…
baloghakos
  • 31
  • 3
3
votes
1 answer

Failed to execute 'elementsFromPoint' on 'Document': The provided double value is non-finite

So I am having issues with selenium clicking hidden nav bar in HTML...I need to click on the action button and then click on Export(Excel). Currently, I have it set to aria-labeledby=share and this assumes I want to click Export(CSV) and performs…
3
votes
1 answer

Is using the Select element instead of physically doing 'element.click()' bad practice in Test Automation?

Is using the Select element instead of physically doing 'element.click()' bad practice in Test Automation? I am concerned if we should even be using