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

This error message…

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

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


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

  • You mentioned about using chromedriver=79.0.3945.36 and the release notes of chromedriver=79.0 clearly mentions the following :

Supports Chrome v79

  • Presumably you are using chrome v79.0 browser.
  • So, it’s quite evident your have chromedriver=80.0 present within your system which is also within the system PATH variable and is invoked while you:

    self.driver=webdriver.Chrome()
    

Solution

There are two solutions:

  • Either you upgrade chrome to Chrome Version 80.0 level. (as per ChromeDriver v80.0 release notes)
  • Or you can override the default chromedriver v80.0 binary location with chromedriver v79.0 binary location as follows:

    from selenium import webdriver
    
    driver = webdriver.Chrome(executable_path=r'C:\path\to\chromedriver.exe')
    driver.get('http://google.com/')
    

You can find a detailed discussion in Ubuntu: selenium.common.exceptions: session not created: This version of ChromeDriver only supports Chrome version 79


Additional Considerations

Ensure to:

  • Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
  • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
  • Take a System Reboot.
  • Execute your @Test as non-root user.
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

Reference

You can find a relevant detailed discussion in:

Leave a Comment