Ubuntu: Selenium.common.exceptions: Session Not Created: This Version Of ChromeDriver Only Supports Chrome Version 79
Solution 1:
This error message...
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 79
...implies that the ChromeDriver v79 was unable to initiate/spawn a new Browsing Context i.e. Chrome Browser session where the browser version was other then v79.x.
Your main issue is the incompatibility between the version of the binaries you are using as follows:
- You mentioned about using chromedriver=79.0.3945.79. Though the released versions of ChromeDriver v79.x are ChromeDriver 79.0.3945.16 (2019-10-30) and ChromeDriver 79.0.3945.36 (2019-11-18), however both the release notes of chromedriver=79.0.3945.79 clearly mentions the following :
Supports Chrome v79
- You are using chromium-browser v79.0.3945.79 browser.
- ChromeDriver supports
google-chrome
when installed at the default location with respect to the underlying os:
For Linux systems, the ChromeDriver expects /usr/bin/google-chrome
to be a symlink to the actual Chrome binary.
Solution
There are two solutions:
- Either you upgrade
google-chrome
installed at the default location to current Chrome Version 79.0 level. (as per ChromeDriver v79.0 release notes) Or you can override the default Chrome binary location i.e.
/usr/bin/google-chrome
with thechromium-browser
binary location following the documentation Using a Chrome executable in a non-standard location as follows:from selenium import webdriver from selenium.webdriver.chrome.options import Options options = Options() options.binary_location='/path/to/chromium-browser.exe' driver = webdriver.Chrome(executable_path=r'C:\Utility\BrowserDrivers\chromedriver.exe', options=options) driver.get('http://google.com/')
You can find a detailed discussion in How to run a Chromium Browser with Selenium?
- Clean your Project Workspace through your IDE and Rebuild your project with required dependencies only.
- If your base Web Client version is too old, then uninstall it and install a recent GA and released version of Web Client.
- Take a System Reboot.
- Execute your
@Test
as non-root user. - Always invoke
driver.quit()
withintearDown(){}
method to close & destroy the WebDriver and Web Client instances gracefully.
Reference
You can find a relevant detailed discussion in:
Solution 2:
By default, webdriver.Chrome
runs /usr/bin/google-chrome
if available, not chromium-browser
(see Default location of ChromeDriver binary and Chrome binary on windows 7). Check google-chrome --version
.
Post a Comment for "Ubuntu: Selenium.common.exceptions: Session Not Created: This Version Of ChromeDriver Only Supports Chrome Version 79"