2

I am getting the following error:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114 Current browser version is 116.0.5845.97 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

Can anyone help me? I've seen some suggestions in other posts but none worked here. I am aware of the Selenium v4.6 update

My code:

from selenium import webdriver
import time
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By




class ChromeAuto:
    def __init__(self):
        self.options = webdriver.ChromeOptions()
        self.options.add_experimental_option('excludeSwitches', ['enable-logging'])
        self.service = Service()
        self.chrome = webdriver.Chrome(service=self.service, options=self.options)
        self.chrome.implicitly_wait(20)
1

3 Answers 3

5

For Chrome 116+ you'll need selenium 4.11.2 at a minimum for the Selenium Manager to download chromedriver 116+ from https://googlechromelabs.github.io/chrome-for-testing/

Then you'll be able to run basic Selenium scripts like this:

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

service = Service()
options = webdriver.ChromeOptions()
options.add_experimental_option('excludeSwitches', ['enable-logging'])

driver = webdriver.Chrome(service=service, options=options)
# Add your code here
driver.quit()
Sign up to request clarification or add additional context in comments.

2 Comments

Every time chrome updates will I have to update selenium? Do I transform the codes into exe and distribute them to customers, in this case is there any way to make this update automatic? @MichaelMintz
It's hopefully a one-time thing for googlechromelabs.github.io/chrome-for-testing - Upgrade to selenium 4.11.2 and then things should work.
0

I have had this issue happen to me a few times and my fix was to add the actual chromedriver.exe file into the same folder as the python file. If your python file is inside of a self-made folder, for example, a folder named "test" in your downloads folder then add the chromedriver.exe file into that "test" folder. If your python file is not inside of a subfolder and you are still getting this issue then try updating selenium.

1 Comment

It happens that I distribute the code with colleagues, in which case each one uses a different version of chorme @Vanden
-1

I face same error during after installing selenium packege in

The chromedriver version (116.0.5845.96) detected in PATH at E:\11. Screnshot_CLIENT_SERVER\node_modules\chromedriver\lib\chromedriver\chromedriver.exe might not be compatible with the detected chrome version (117.0.5938.63); currently, chromedriver 117.0.5938.62 is recommended for chrome 117.*,

Selenium packege not install letest webdriver version but it installwhich was letest at time when selenium packege updated.

So you have to replace latest web driver with old webdriver remainedin package module

For node js: node_modules\chromedriver\lib\chromedriver\chromedriver.exe

1 Comment

As it’s currently written, your answer is unclear. Please edit to add additional details that will help others understand how this addresses the question asked. You can find more information on how to write good answers in the help center.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.