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

theotheraussie picture theotheraussie · Jan 22, 2019 · Viewed 32.9k times · Source

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.SessionNotCreatedException: Message: session not created: Chrome version must be between 70 and 73
(Driver info: chromedriver=2.45.615291 (ec3682e3c9061c10f26ea9e5cdcf3c53f3f74387),platform=Windows NT 6.1.7601 SP1 x86_64)

I downloaded the latest version of chromedriver (2.45) which requires Chrome 70-73. My current Chrome version is 68.0.3440.106 (Official Build) (64-bit), which is the latest. I tried downloading an "older" chrome version (71) and when I tried installing it, the installer indicated that I had a newer version already installed.

There doesn't seem to be any previous Chromedriver releases available for download, even though the website says there is. I couldn't find them.

I don't quite understand how version 71 is older than 68?

Is there a Chrome version newer than 68 actually available, or an older version of chromedriver i can use with Chrome 68?

Does anyone have any other suggestions?

This is the code that i'm trying to execute:

import time
from selenium import webdriver
from selenium.webdriver.common.keys import Keys
user = 'XXXXXXX'
pwd = 'XXXXXXX'
chromedriver = "...\...\...\chromedriver.exe"
driver = webdriver.Chrome(executable_path=chromedriver) # Error occurs at this line
driver.get("http://www.facebook.com")
assert "Facebook" in driver.title
time.sleep(5) # So i can see something!
elem = driver.find_element_by_id("email")
elem.send_keys(user)
time.sleep(5) # So i can see something!
elem = driver.find_element_by_id("pass")
elem.send_keys(pwd)
time.sleep(5) # So i can see something!
elem.send_keys(Keys.RETURN)
driver.close()

Answer

kilinkis picture kilinkis · Apr 30, 2019

For me, upgrading the driver did the trick. Just run:

brew cask upgrade chromedriver

and then try running your test again. Hope it helps!