SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 84 using ChromeDriver and Chrome through Selenium and Python

前端 未结 2 1409
你的背包
你的背包 2020-11-30 13:19

I am using python 3 on windows 7, selenium, chromedriver version 84 (latest) to automate my chrome browser.

I am using this script:

相关标签:
2条回答
  • 2020-11-30 13:40

    This error message...

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

    ...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=84
    • Release Notes of chromedriver=84 clearly mentions:

    Supports Chrome version 84

    • Presumably you are using chrome=83 the latest push for Chrome.

    So there is a clear mismatch between ChromeDriver v84 and the Chrome Browser v83


    Solution

    There are two (2) solutions to this issue.

    • The easiest solution would be to download and start using chromedriver=83.0.4103.39
    • If you want to continue with chromedriver=84 you have to download the latest Chromium binary from either of the official development repositories:
      • The Chromium Projects
      • chromium.appspot
      • Chrome Canary - Nightly build for developers

    Additionally also ensure that:

    • Selenium is upgraded to current levels Version 3.141.59.
    • If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
    • 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.
    0 讨论(0)
  • 2020-11-30 13:49

    Your ChromeDriver version and your installed version of Chrome need to match up. You are using ChromeDriver for Chrome version 84, which at the time of this answer, is a beta (non-stable) build of Chrome; you're probably not using it. Likely you're on version 83.

    Check your Chrome version (Help -> About) and then find the correct ChromeDriver release. You could instead use webdriver-manager which can handle this for you.

    0 讨论(0)
提交回复
热议问题