Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error: System.InvalidOperationException: session not created: Chrome version must be between 70 and 73 using ChromeDriver and Chrome through Selenium

Result StackTrace:  
at OpenQA.Selenium.Remote.RemoteWebDriver.UnpackAndThrowOnError(Response errorResponse)
   at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
   at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)
   at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service, ChromeOptions options, TimeSpan commandTimeout)
   at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeOptions options)
   at WhitelabelUITest_New.Initializers.Initialize() in X:\QA\WhitelabelUI-Automation\WhitelabelUITest-New\Initializers.cs:line 87
   at WhitelabelUITest_New.Initializers..ctor() in X:\QA\WhitelabelUI-Automation\WhitelabelUITest-New\Initializers.cs:line 41
   at WhitelabelUITest_New.Webpage..ctor()
   at WhitelabelUITest_New.ImpressionTests..ctor()
Result Message: Unable to create instance of class WhitelabelUITest_New.ImpressionTests. Error: System.InvalidOperationException: session not created: Chrome version must be between 70 and 73
  (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.16299 x86_64) (SessionNotCreated).

I installed the latest version of Chrome driver, but every time I run a test case, it does not initiate the Chrome driver and the test fails.

like image 239
Analyst Avatar asked Mar 21 '19 15:03

Analyst


1 Answers

This error message...

Result Message: Unable to create instance of class WhitelabelUITest_New.ImpressionTests. Error: System.InvalidOperationException: session not created: Chrome version must be between 70 and 73
  (Driver info: chromedriver=73.0.3683.68 (47787ec04b6e38e22703e856e101e840b65afe72),platform=Windows NT 10.0.16299 x86_64) (SessionNotCreated).

...implies that the ChromeDriver expects the Chrome Browser version to be between 70 and 73.

Your main issue is the incompatibility between the version of the binaries you are using as follows:

  • You are using chromedriver=73.0.3683.68
  • Release Notes of chromedriver=73.0.3683.68 clearly mentions the following :

Supports Chrome v73

  • Your Chrome Browser version is unknown to us.

It is pretty evident your Chrome Browser version is not of version 73.0


Solution

  • Keep ChromeDriver to ChromeDriver v73.0.3683.68 level.
  • Upgrade/Downgrade Chrome version to Chrome v73 level. (as per ChromeDriver v73.0.3683.68 release notes)
  • 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.
  • Execute your @Test.
  • Always invoke driver.quit() within tearDown(){} method to close & destroy the WebDriver and Web Client instances gracefully.

Reference

You can find a relevant detailed discussion in:

  • How to work with a specific version of ChromeDriver while Chrome Browser gets updated automatically through Python selenium
like image 52
undetected Selenium Avatar answered Sep 28 '22 02:09

undetected Selenium