Using correct ChromeDriver.exe but still getting driver version error message

0

so the issue I'm having is when I try to run my automation tests with the Chrome Web browser, I get the following error message:

System.InvalidOperationException
  HResult=0x80131509
  Message=session not created: This version of ChromeDriver only supports Chrome version 80
  (Driver info: chromedriver=80.0.3987.106 (f68069574609230cf9b635cd784cfb1bf81bb53a-refs/branch-heads/3987@{#882}),platform=Windows NT 10.0.17763 x86_64) (InsecureCertificate)
  Source=WebDriver
  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(ChromeDriverService service, ChromeOptions options)
   at OpenQA.Selenium.Chrome.ChromeDriver..ctor(ChromeDriverService service)
   at Gov.Baaqmd.Tests.SeleniumUITests.SeleniumUITests.InitializeWebDriver() in D:\NPS\Tests ProductionSystem WebUI\SeleniumUITests\Framework\SeleniumUITests.cs:line 250
   at Gov.Baaqmd.Tests.SeleniumUITests.SeleniumUITests.TestInitialize() in D:\NPS\Tests ProductionSystem WebUI\SeleniumUITests\Framework\SeleniumUITests.cs:line 168

After the first time I got this error message, I went to Chromium.org page and looked through their directory for the correct chromedriver version that was specified in the error message above, downloaded it and replaced it with the existing chrome driver I had. Once that was done, I tried running my automation script again, but got the same exact error message and I'm at a loss as to what to do next.

  • My Selenium.Support nuget package = v3.9.1
  • My Selenium.WebDriver nuget package = V3.9.1
  • My current version of my Google Chrome web browser = Version 83.0.4103.106 (Official Build) (64-bit)

I do find it weird that the chromedrivers from the website are Win32 bit versions, I don't know if that's part of the issue.

selenium
google-chrome
selenium-chromedriver
visual-studio-2019
asked on Stack Overflow Jun 17, 2020 by Tscott

3 Answers

0

The chrome version should match with your chromedriver.exe, if you want to update along with the chrome browser version use WebDriverManager This will update your chromedriver everytime you run the tests. Else download it manually , but the versions needs to be compatible and workable.

answered on Stack Overflow Jun 17, 2020 by SeleniumBeginner
0

Figure out how does your test framework obtains chromedriver. Cases I had dealt with:

  1. Framework runs the chromedriver that is installed on the machine in advance - if you're on Windows, go check PATH env variable to make sure that there's no path to some old driver you've forgotten about

  2. Framework downloads the chromedriver according to the version that is set in the configs - you just need to adjust the configs and set compatible version

answered on Stack Overflow Jun 17, 2020 by Alex Pahom
0

https://chromedriver.chromium.org Check above link , you should use right chrome driver exe file according to your chrome browser version

answered on Stack Overflow Jun 18, 2020 by Justin Lambert

User contributions licensed under CC BY-SA 3.0