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.

2
  • I am not a visual studio user but is there anything that allows you to clean up the project Commented Jun 17, 2020 at 2:49
  • There is, but sadly, cleaning up the project did not fix this issue. Commented Jun 17, 2020 at 16:23

6 Answers 6

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.

Sign up to request clarification or add additional context in comments.

2 Comments

Sadly, it looks like I can't. I get the following error when getting the Nuget package for it Severity Code Description Project File Line Suppression State Error Could not install package 'WebDriverManager 2.9.1'. You are trying to install this package into a project that targets '.NETFramework,Version=v4.5.2', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.
This is often with version and driver differences.Would you try downgrading/upgrading your chrome browser version to the driver version by going into you about chrome and upgrading or getting chrome version 80 ,that doesn’t need any binaries .Also set your exe path property to the correct chrome driver.exe
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

3 Comments

For number 1, what should I exactly be looking for in the PATH env variable? I'm only seeing things leading to Microsoft SQL Server and Docker stuff. The majority of the variables are pointing to the C drive and not the D drive where I have Visual Studio installed. For Number 2, do you where or the possible name of the config file I would have to change?
1. Open up the command line and run chromedriver command (or chromedriver.exe, cannot recall). If it runs the driver - it means that PATH does know where to look chromedriver at. You can extract exact driver's path from the command line (where chromedriver works for me on Win10) and find the location of a driver file. Then you either replace the file according to location or update location to point at fresh driver.
2. That totally depends on the framework you're using. For example - webdriver.io/docs/selenium-standalone-service.html - WebdriverIO keeps it in wdio.conf.js file. So you should refer to documentation of your tool
0

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

Comments

0

The Selenium error messaging is poor, and remains so (2 years after this question was posted). When they say "This version of ChromeDriver only supports Chrome version X", they mean the major versions must match exactly. Chrome cannot be newer than ChromeDiver, and ChromeDriver cannot be newer than Chrome. You can solve by upgrading one or downgrading the other.

1 Comment

Incidentally, this messaging has continued to cause so much confusion, and gain so much attention, that it makes web searches for other, related issues, that much more difficult. Ie. I came here because Selenium tells me I need Chrome 98. I have Chrome 98, installed in the default location. But Selenium disagrees.
0

Check if the chrome driver is in C: drive or in some other drive location, I got the same issue. But when i stored the chromedriver in C drive and given location from there it's working.

Comments

0

Check that this line in you project file is correct. Installing the latest package doesn't change this. Delete this line and then install the package.

<Import Project="..\packages\Selenium.WebDriver.ChromeDriver.122.0.6261.6901\build\Selenium.WebDriver.ChromeDriver.targets" Condition="Exists('..\packages\Selenium.WebDriver.ChromeDriver.122.0.6261.6901\build\Selenium.WebDriver.ChromeDriver.targets')" />

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.