7
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.

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
Analyst
  • 105
  • 1
  • 9
  • Update your chrome browser version to 73 – KunduK Mar 21 '19 at 15:24
  • So... did you check if your Chrome version is between 70 and 73? – Meta-Knight Mar 21 '19 at 15:29
  • Driver info: chromedriver=73.0.3683.68. that might be above 73; this code might literally mean "no newer that 73.0.0" – ThisIsMe Mar 21 '19 at 15:39
  • I mentioned it already that the driver is updated to 73.0.3683.68. But this issue is only on My PC. my college is using the same project on his PC and it worked fine. Only when i am trying to run the test case on my PC from source control, it fails – Analyst Mar 21 '19 at 15:46
  • @Analyst It's about BROWSER version, not the DRIVER – Fenio Mar 21 '19 at 15:47
  • Yes, It is chromedriver version. Right now as a temporary solution i switched to firefox and i am able to start working but i need to resolve it in able to start using chromedriver. – Analyst Mar 21 '19 at 15:52
  • How do you launch browser - Using WebDriverManager or setting binary manually – TheSociety Mar 21 '19 at 16:45

2 Answers2

7

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:

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:

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • 1
    Thanks Debanjan. I noticed my chrome version is still 69.0.3497.92 which is not compatible.Thanks for your help. i totally missed checking the version earlier. – Analyst Mar 21 '19 at 18:50
2
  1. Uninstall Chrome

  2. Install it again from the offline installer here.

double-beep
  • 5,031
  • 17
  • 33
  • 41
Neal Barsch
  • 2,810
  • 2
  • 13
  • 39