Reputation: 597
Chrome Browser updated the latest version and thus the tests are not executing -
ERROR -FAILED session not created: This version of ChromeDriver only supports Chrome version 75
Please help
public WebDriver getWebDriverObject(DesiredCapabilities capabilities) {
File driverFile = null;
URL chromedriverPath = getClass().getResource("/drivers/chromedriver.exe");
URL linuxDriverPath = getClass().getResource("/drivers/chromedriver");
URL macDriverPath = getClass().getResource("/drivers/macchromedriver");
String os = System.getProperty("os.name").toLowerCase();
try {
if (os.contains("linux")) {
driverFile = new File(linuxDriverPath.toURI());
} else {
if (os.contains("mac")) {
driverFile = new File(macDriverPath.toURI());
} else {
driverFile = new File(chromedriverPath.toURI());
}
}
} catch (URISyntaxException e) {
e.printStackTrace();
}
ChromeDriverService service = new ChromeDriverService.Builder().usingDriverExecutable(driverFile)
.usingAnyFreePort().build();
ChromeOptions options = new ChromeOptions();
options.merge(capabilities);
return new ChromeDriver(service, options);
}
Upvotes: 1
Views: 4855
Reputation: 1
I got this error " 'session not created: This version of ChromeDriver only supports Chrome version 77" . i was using Visual studio and my chrome version upgraded automatically to 79 so i updated chrome drvivers version from Nuget packages. its working
Upvotes: 0
Reputation: 408
I had a similar problem, my chromedriver didn't support my chrome (I had latest chrome version), and I resolved following the steps here: https://sites.google.com/a/chromium.org/chromedriver/downloads/version-selection
And after downloading the correct driver and unzipping the file I copied it to the correct location in the project under: node_modules/appium-chromedriver/chromedriver/linux/
(I'm using linux) and renaming it to chromedriver_64
Hope this helps.
Upvotes: 0
Reputation: 129
You have to update your ChromeDriver to the same version to Chrome browser. It will fixed your solution. I have test it with C#, It work well. The last version of ChromeDriver should be 77.0.3865.4000 and It working well with Google Chrome version 77.0.3865.90.
Upvotes: 0
Reputation: 1
I experience the same issue with Chrome 77 and ChromeDriver 77. I run my tests remotely on multiple nodes. The only way I could get chrome session created is when I do not specify Platform in driver options.
Upvotes: 0
Reputation: 153
I am using exact same version and it is working fine. This error only occurs when there is a mismatch between broswer and driver version. Please make sure you have deleted ChromeDriver 75 from your machine and your script is pointing to correct path of ChromDriver 77.
Upvotes: 1