Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

selenium.common.exceptions.SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 114. LATEST_RELEASE_115 doesn't exist

#Once the zip has finished downloading, extract the folder and copy the path of the chromedriver exe file (should be the #first one), add it to your code like this,

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

url = "somewebsite.com"

service_obj = Service("D:\\Users\\eggman\Downloads\chromedriver-win64\chromedriver-win64\chromedriver.exe")
driver = webdriver.Chrome(service=service_obj)
driver.get(url)

Returns the error:

selenium.common.exceptions.SessionNotCreatedException: This version of ChromeDriver only supports Chrome version 114. LATEST_RELEASE_115 doesn't exist

I'm guessing to avoid this in the future I can just turn off automatic updates?

I originally used the following code which worked fine

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)
like image 422
eggman Avatar asked Sep 03 '25 02:09

eggman


1 Answers

For Chrome/chromedriver 116+, the solution is similar to https://stackoverflow.com/a/76731553/7058266, but now you need a minimum selenium version of 4.11.2. Then selenium gets the correct driver for you at runtime.

from selenium import webdriver
from selenium.webdriver.chrome.service import Service

service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
# ... Automate something here
driver.quit()

For more info on the new Chrome-for-Testing, see https://googlechromelabs.github.io/chrome-for-testing/ (this also includes chromedrivers for testing).

like image 121
Michael Mintz Avatar answered Sep 04 '25 20:09

Michael Mintz