I have found out that my current chrome version is 96.0.4664.45
Now, when I install the correct ChromeDriver version from here and run, it still throws this error-
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 91
Current browser version is 96.0.4664.45 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
Can someone please help me sort this out?
CodePudding user response:
It seems a problem with system executable path. Try linking your chromedriver.exe with correct path with adjusting your old path;
browser = webdriver.Chrome(executable_path=r"NEW_VERSION_PATH\chromedriver.exe"
CodePudding user response:
Please download chrome driver from here.
Once downloaded please place it in the current project directory, or any directory which is not sensitive from the Windows OS perspective.
and then use it like this
driver_path = r'C:\\Users\\userid\\some_folder\\Desktop\\Automation\\chromedriver.exe'
driver = webdriver.Chrome(driver_path)
CodePudding user response:
This error message...
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 91
Current browser version is 96.0.4664.45 with binary path C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
...implies that the ChromeDriver was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- You are using chrome=96.0.4664.45
- Release Notes of ChromeDriver v96.0 clearly mentions the following :
Supports Chrome version 96
- But you are using chromedriver=91.0
- Release Notes of chromedriver=91.0 clearly mentions the following :
Supports Chrome version 91
So there is a clear mismatch between chromedriver=91.0 and the chrome=96.0.4664.45
Solution
Ensure that:
- ChromeDriver is updated to current ChromeDriver v96.0 level.
- Chrome is updated to current chrome=96.0.4664.45 (as per chrome=96.0.4664.45 release notes).