2

I imported webdriver from selenium and os. I want to be able to run this piece of code successfully:

driver = webdriver.Chrome(executable_path= os.path.abspath('') + '/chromedriver')

The error I'm getting:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81

I'm using python 2.7 on a MAC OSX. I have version 81.0.4044.138 of the chromedriver installed from https://sites.google.com/a/chromium.org/chromedriver/downloads in the same workspace directory, and it is named 'chromedriver', but it's like my webdriver doesn't recognize it. I would appreciate any suggestions!

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
defaultuser
  • 45
  • 2
  • 5

2 Answers2

0

This is happening in most cases due to differences between the Chrome web driver version and the Chrome Browser version.

I would suggest you to do the following: 1- Take a backup of your work. 2- Update Chrome Browser to the latest version. 3- Install the latest version of the chrome browser. 4- Kill any chromedriver process that is running in the background. 5- Clean up your code and give it a try.

0

This error message...

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 81

...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.


Analysis

Your main issue is the incompatibility between the version of the binaries you are using as follows:

  • You are using ChromeDriver 81.0
  • Release Notes of ChromeDriver 81.0 clearly mentions the following :

Supports Chrome version 81

Most probhably the Chrome Browser got updated to Chrome v83.0 as a part of the recent push.

Supports Chrome version 83

  • Your Selenium Client version is unknown to us.

So there is a clear mismatch between ChromeDriver v81.0 and the Chrome Browser v83.0


Solution

Ensure that:

  • Selenium is upgraded to current levels Version 3.141.59.
  • ChromeDriver is updated to current ChromeDriver v83.0 level.
  • Chrome is updated to current Chrome Version 83.0 level. (as per ChromeDriver v83.0 release notes)
  • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
  • Execute your @Test as non-root user.
undetected Selenium
  • 183,867
  • 41
  • 278
  • 352