Questions tagged [chromedriver]

ChromeDriver is a standalone server which implements WebDriver's wire protocol for Chromium. WebDriver is an open source tool for automated testing of webapps across many browsers. It provides capabilities for navigating to web pages, user input, JavaScript execution, and more. ChromeDriver is available for Chrome on Android and Chrome on Desktop (Mac, Linux, Windows and ChromeOS).

Filter by
Sorted by
Tagged with
43 votes
12 answers
359k views

How do I close the browser window at the end of a Selenium test?

I have googled for the answer, but the .stop() so frequently mentioned doesn't work for me. The Chrome window the test was running in remains open. def test_getResults(self): sel = selenium('...
Aaron's user avatar
  • 2,335
23 votes
10 answers
65k views

Chrome driver 2.28: "Chrome is being controlled by automated test software" notification. Can it be removed?

I have just updated my project with the latest chrome driver (2.28). When I run the browser through the driver, a yellow notification pops under the URL bar, saying "Chrome is being controlled by ...
nir's user avatar
  • 231
19 votes
7 answers
25k views

How to disable Chrome save your password? (Selenium Java)

What is the method to disable this pop-up: Do you want Google Chrome to save your password for this site? How to do this with Selenium Webdriver (Java)?
Ganeshselvan N's user avatar
17 votes
8 answers
54k views

How to autoupdate Chrome-driver in Selenium?

Every now and then when the Chrome is updated, the existing chrome driver used in the script becomes invalid and the below error message is displayed: selenium.common.exceptions....
Divya Anchan's user avatar
6 votes
5 answers
40k views

How to set browser locale with chromedriver (Python)

I am trying to set my browser locale by doing the following options = webdriver.ChromeOptions() options.add_argument('--lang=es') driver = webdriver.Chrome(executable_path=driver_location, ...
user841279's user avatar
6 votes
5 answers
64k views

How to modify HTTP request header in Selenium WebDriver with Java?

I want to add "iv-user" request header to log into web app. I'm using the newest ChromeDriver. Using extensions like ModHeader or ModifyHeaders is not working in this case. Fiddler is working, but I ...
M. Murawski's user avatar
6 votes
2 answers
5k views

Force a browser's visibility setting to true

I'm trying to set up some specs against a real (not headless) browser but some of the javascript on the target page only runs if the browser is visible (it doesn't need to be the active app). I've ...
ian's user avatar
  • 113
6 votes
3 answers
13k views

Chromedriver not deleting scoped* dir in temp folder after test is complete

With latest chromedriver.exe running into out of disk space issues as chromedriver is not deleting the folder named scoped_* at the end of the execution. It occupying almost 40 GB of space for 1000 ...
Karthi's user avatar
  • 61
5 votes
1 answer
12k views

Try Assert Exceptions not failing test in python unittest or better way to loop through failures

Okay I am running Chromedriver test that gathers console logs and then tests an assertion against pythons unittest. class ConsoleLogsTest(unittest.TestCase): @classmethod def setUpClass(cls)...
Cynic's user avatar
  • 235
5 votes
2 answers
5k views

Chrome argument "--disable-infobars" does not work with Chrome 65

When I start Chrome by Chromedriver with Selenium, Infobar is not hiddened. Because chrome has updated version 65.x.x.x. Here is my code: [VB.NET] Dim driverService = ChromeDriverService....
iClick Softwares's user avatar
5 votes
2 answers
2k views

Using SuperTest/Protractor on unsecure HTTPS

I am trying to run automated API tests on localhost with an invalid cert. Is there a chromeOption equivalent to "Proceed Anyway" that I can pass to the tests so they can get a response from the url? ...
ItsASine's user avatar
  • 143
5 votes
1 answer
448 views

How to control CEF3 portions of .NET project using Webdriver2?

We have a very large .NET project. This has been E2E/regression tested using QTP for 3 years. Eventually, our AUT is moving to the WEB. This process is expected to take a couple of years, it will be ...
user3519082's user avatar
4 votes
3 answers
6k views

How does chromedriver.exe work on a core and fundamental level

I know that Selenium Webdriver is evolved from Selenium RC. Server in the Selenium RC was used to overcome the "same origin policy" using the proxy injection. Is it that the chromedriver.exe performs ...
Alok's user avatar
  • 760
4 votes
2 answers
12k views

Selenium + ChromeDriver + Headless Chrome - failed to wait for extension background page to load

I am using Selenium 3.10.0 + ChromeDriver 2.37.543619 + Google Chrome 65.0.3325.162 I have a browser extension that I need when testing: Browser extension I am running this code: ChromeDriver ...
Nicholas DiPiazza's user avatar
4 votes
2 answers
3k views

Error trying to add chrome extension in nightwatchjs

I am trying to add an extension to my chromedriver for use in my test. According to the nightwatchjs website here, extensions | array of strings | A list of Chrome extensions to install on ...
Swagin9's user avatar
  • 476
4 votes
1 answer
4k views

Do I need to run selenium server when using chromedriver?

I'm new to Selenium and Nightwatch and installed selenium-webdriver first, then chromedriver and finally I installed Nightwatch (because the syntax looks nice to me). Now when I want to run a single ...
RSeidelsohn's user avatar
4 votes
1 answer
820 views

Selenium downloads tmp file instead of CSV file

When I download a CSV file from a blob URL, the downloaded file always has a ".tmp" extension and wrong file name. When downloading the same file manually, the file extension and file name both are ...
Ankita Patil's user avatar
4 votes
1 answer
8k views

Selenium: how to prevent a just-started Chrome window from receiving focus

Using Selenium + chromedriver on Linux, like so; chrome_options = Options() driver = webdriver.Chrome('/usr/bin/chromedriver',options=chrome_options) driver.get('https://www.somewebsite.com') Chrome ...
Roel Van de Paar's user avatar
3 votes
1 answer
23k views

How do I enable ChromeDriver to use browser cache or local storage with selenium python

I was trying to automate a website and it's a PWA. I need the caching data for this site as it takes too long to load, once loaded it's pretty fast. But every time I run my scripts chrome starts a new ...
Shahrear Bin Amin's user avatar
3 votes
3 answers
12k views

Chromedriver quit() method doesn't close all chrome.exe processes

When I am trying to close the chrome browser using driver.quit() and driver.close(), browser is getting closed but chromedriver.exe process is not getting closed. How can we remove these processes ...
sri's user avatar
  • 31
3 votes
3 answers
659 views

In Page Object Model does all classes need to share a single driver instance?

I can create a BaseTest.java file and declare Public static WebDriver driver; in it. Then all classes can extend and use the same driver reference. Then all my test classes can use same instance. Can ...
Brian.tester687's user avatar
3 votes
3 answers
1k views

Google Chrome browser and driver versioning

I have a CI pipeline that runs my E2E tests, which the agent is prepared by: Install Google Chrome by brew (latest) Chromedriver is installed by chromedriver_binary python package (fixed version) ...
Ramon Medeiros's user avatar
3 votes
1 answer
251 views

Getting different results using selenium and iFrames on Firefox 63, Chrome 69 and Chrome 70

I wrote a test using Katalon Studio 5.8.0. My application under test contains a iFrame. Fortunately, both the iFrame and its children are identified using unique attributes. So, the following code ...
fgrossin's user avatar
3 votes
1 answer
7k views

Can't drag and drop from source to target using selenium and python

I am trying to drag and drop using Python and Selenium. I have two containers with rows which indicate file names and by drag and drop, I want to transfer one file from the first container to the ...
Marialena's user avatar
  • 191
3 votes
1 answer
1k views

How can run selenium script in chrome browser using intelliJ IDEA 2017.2.4

I have created simple TestNG file with simple code to open chrome browser in IntelliJ IDEA but its throwing below error, please help me. My code: public class Sample{ @Test (priority = 0) ...
Rajan Ganesh's user avatar
3 votes
1 answer
3k views

How to load multiple chrome extensions in Chrome browser using Selenium java?

I got the below code to open Chrome browser using Selenium with extension enabled. To enable multiple chrome extensions, do I need to repeat the steps or is there any simpler way? String ...
Jaden's user avatar
  • 31
3 votes
1 answer
1k views

How to log *everything* in Selenium/WebDriver/ChromeDriver

I am struggling with this stale-element-exception. Now I had the idea that I could perhaps maximize the logging in order to get a closer look on what's actually happening. I am instantiating the ...
MBaas's user avatar
  • 197
3 votes
2 answers
6k views

ChromeDriver : driver failed to parse value of getElementRegion - understanding the error

The chrome on my office Mac machine recently updated to 76+. Since then one of the tests, written in Protractor and CucumberJS, started failing to cite this error - WebDriverError: unknown error: ...
demouser123's user avatar
  • 3,532
3 votes
2 answers
635 views

How do I configure my env.rb file to be able to switch browsers?

Currently, here is part of my configuration with testing using Chrome: prefs = { 'download' => { 'default_directory' => "#{$myRoot}/PDF", 'prompt_for_download' => ...
user3224193's user avatar
3 votes
3 answers
4k views

Selenium GeckoDriver vs ChromeDriver

I will try to be as clear as possible. Lets take an identical test case in both browsers. Open a page and find an element by the following method: wait.until(ExpectedConditions.elementToBeClickable(...
R.Ro's user avatar
  • 217
3 votes
2 answers
2k views

Selenium FindElements() hangs sometimes

I have a problem when trying to find many elements in a page. Basically i have 20 identical pages, with slightly different data. Think 20 excel sheets. Page 1 50rows, page 2 100 rows, etc.. each row ...
George's user avatar
  • 1,412
3 votes
0 answers
445 views

Server gets incredibly slow when running Selenium

I'm attempting to run Selenium (Chrome) test on 2 servers, each running Windows Server 2019 Standard (with GUI). The first server (the one with the worst specs) has the following specs: It runs ...
Hasse Andersen's user avatar
3 votes
2 answers
4k views

Headless Chrome browser won't switch to next window (Selenium + Python)

So I have a test case: When clicking a button a new window is opened. To switch to that new window I use: window_after = self.driver.window_handles[1] self.driver.switch_to.window(window_after) When ...
rodut's user avatar
  • 197
3 votes
2 answers
1k views

Drag and Drop does not work with headless chromedriver

I am automating drag and drop using Selenium and Java. Following is the code used for performing drag and drop using chrome driver in headless mode. Point classname = targetElement.getLocation(); int ...
Rubenee's user avatar
  • 31
3 votes
0 answers
2k views

Headless Chrome with Docker Compose

I'm currently trying to setup headless chrome testing with Capybara in my docker-compose file. However, I keep getting that chromedriver has failed to start because it had crashed. Selenium::...
Kai Mou's user avatar
  • 31
2 votes
3 answers
12k views

How to handle a ReCAPTCHA picture?

How To Write Code in Selenium To Click This Picture , Down I Have Attached My Selenium Code. package Login; import java.io.File; import java.io.IOException; import org.apache.poi....
koushick's user avatar
  • 133
2 votes
2 answers
1k views

Multithreading: chromedriver does not open url in second window

Java code in thread function, System.setProperty("webdriver.chrome.driver", "/usr/bin/chromedriver"); ChromeOptions chromeOptions = new ChromeOptions(); chromeOptions.addArguments("--no-sandbox"); ...
sama940's user avatar
  • 21
2 votes
1 answer
2k views

Selenium webdriver is getting log entries for the server event "500 internal server error" when using GetLog(LogType.Browser)

After I have been doing any automated task with selenium webdriver, I check the javascript log to see if anything unexpected has happened. To do that, I am using browser.Manage().Logs.GetLog(LogType....
Anders Lindén's user avatar
2 votes
2 answers
3k views

Selenium send_keys on chromium confused by forward slashes

I am using selenium webdriver under python on a Debian jessie machine. The browser I am currently testing is Chrome (version 55) with chromedriver (version 2.27). If I send the string 1/2/3 to a ...
rlandster's user avatar
  • 191
2 votes
3 answers
13k views

Programmatically determine chrome browser version regardless of OS

My problem is chromedriver 78 (currently the latest) doesn't work with Chrome 77. Ubuntu still has 77 in the apt-get repo for google-chrome-stable. My regression script automatically pulls down the ...
Marcel Wilson's user avatar
2 votes
3 answers
397 views

Selenium forgets the authentication

I'm using Selenium and Java to automate tests. When opening the page under test, Chrome performs basic authentication (prompts for username/password). However, authentication should be solved on the ...
Mate Mrše's user avatar
  • 4,119
2 votes
2 answers
2k views

Why chromedriver is not recognized when an environment variable is created in windows 10?

I created a testing project and set an environment variable. Then run the project and it could not find the chromedriver. Then I set a path inside the project to the chromedriver. It worked. ...
Syrus's user avatar
  • 1,197
2 votes
1 answer
18k views

How do I remove unnecessary console message pop up using selenium with Python?

When I used Chromedriver with selenium in python, I get a lot of console messages that are not useful to me and that don't affect my scraper. How do I not output these? I do not have this issue when I ...
E. Jin's user avatar
  • 43
2 votes
1 answer
1k views

How to start Chrome in automation mode from command line?

I am trying to find how to start Chrome as if it was started by webdriver, but manually from command line. I was looking at this list of options, but couldn't find what I need. https://peter.sh/...
CuriousGuy's user avatar
2 votes
3 answers
5k views

Selenium Download Keep and Discard Problem (.cer or xml extensions)

I'm Test Automation Engineer, working with Selenium and Java. I'm developing selenium automation tests, but I have a problem with downloading something from the software I'm working on. Chrome asks me ...
M S's user avatar
  • 21
2 votes
1 answer
680 views

How to do right mouse click in protractor chrome?

After referring to: PROTRACTOR: Right click on link and open in NEW TAB I tried below code : describe('Right click', function () { it('test {Regression} {Sanity} {Sanity}', async ...
jk2001's user avatar
  • 23
2 votes
1 answer
289 views

Browser is closed only if test passed on VM

I use driver.Dispose(); and using ChromeDriver. But the browser is closed only if the test passed. On the VM if a test failed, the browser is still open. If I run tests from Visual Studio on local ...
Sathira Padukka's user avatar
2 votes
1 answer
53 views

ChromeDriver FlashPolicyHelper does not work remotely

We're using the new FlashPolicyHelper(driver).addSite("https://your.site") In order to bypass the getFlash prompt when trying to navigate to our websites that use Flash. However this does not ...
Austin Duran's user avatar
2 votes
1 answer
11k views

“org.openqa.selenium.WebDriverException: unknown error: Chrome failed to start: exited abnormally” issue on jenkins(openshift) chrome node

I've been trying to run selenium codes over Jenkins (server/openshift). There is chrome node in the jenkins machine for Test Automation - Selenium. I'm getting this error: org.openqa.selenium....
Furkan's user avatar
  • 121
2 votes
1 answer
2k views

Error running selenium test on ubuntu

I'm having trouble running a selenium test on ubuntu, but everything works fine on my windows system. I'm using a mocha test suite, and am using selenium-webdriver to run the selenium test written in ...
DervDC's user avatar
  • 31