selenium.common.exceptions.SessionNotCreatedException: Message: session not created: Chrome version must be between 70 and 73 with ChromeDriver

前端 未结 11 1429
轮回少年
轮回少年 2021-02-05 08:03

I am trying to create a webcrawler using Selenium, but I get this error when I try to create the webdriver object.

selenium.common.exceptions.SessionNotCreatedEx         


        
11条回答
  •  无人及你
    2021-02-05 08:54

    I faced this issue due to mismatch of chromedriver and chrome version. I followed the below steps to resolve my issue:

    1) First, find out which version of Chrome you are using. My Chrome version was 77.0.3865.90.
    2) Take the Chrome version number, remove the last part, and append the result to URL "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_". For example, with Chrome version 77.0.3865.90, you'd get a URL "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_77.0.3865".
    3) Use the URL created in the last step to retrieve the version of ChromeDriver to use. For example, the above URL will get your a file containing "77.0.3865.40". (The actual number may change in the future, of course.)
    4) I then did :
      webdriverdownloader chrome:77.0.3865.40 on my mac terminal.
    

    After this your Chromedriver and Chrome version must be in sync and the issue should be fixed.

提交回复
热议问题