2

Getting this error when trying to launch headed selenium session.

command I used was driver = webdriver.Chrome(executable_path=r'C:\Users\Administrator\Desktop\chromedriver\chromedriver.exe')

1 Answer 1

3

Please downgrade to Chromedriver 80 (which is stable version). Chromedriver 81 is still beta version and it supports chrome 81, I am sure you might have Chrome browser version 80.

You can download chrome 80 stable version from here

Edit 1: Recommended

Alternatively you can use webdriver-manager which will take care of installing the latest driver on the fly. So you don't have to worry, each time when your browser get's updated/ newer version of driver is available.

Here is how you can install the webdriver-manager using pip.

pip install webdriver-manager 

Once the webdriver_manage is installed successfully you can start using it in the script as shown below.

from selenium import webdriver from webdriver_manager.chrome import ChromeDriverManager driver = webdriver.Chrome(ChromeDriverManager().install()) driver.get("https://www.google.com") driver.quit 

The great part with this library is you can install any driver on the fly.

Sign up to request clarification or add additional context in comments.

3 Comments

Glad that we are helpful. Please [upvote] (stackoverflow.com/help/why-vote) for the benefit of future readers.
Do you know how to fix this for an Angular 8.2.x code project? Its the same error but the ng e2e command (run selenium tests) automatically looks for chromedriver 81.0.4044.20
not sure on angular, but try with npm install -g webdriver-manager

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.