'Selenium - This version of ChromeDriver only supports Chrome version xx

Suddenly today all my tests stopped working, giving me following error message:

selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 97 Current browser version is 99.0.4844.51 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

I have not updated the browser (auto-update is disabled) before the error occurred, i haven't changed anything at all. I have now downloaded Version 99.0.4844.51 of both the browser as well as driver but I still get the very same error. I've tried every solution i could find on here and the internet (although most were just "update your stuff") but nothing has worked.



Solution 1:[1]

I had the same issue, chromedriver stays linked for old version of chromedriver even if new version was updated. Try to use instructions below, for me it was helpful:

  1. Go to manage nuGet packages..

  2. then go to browse tab and search the package with keyword: "Selenium.Chrome.WebDriver" (For other browser, install corresponding package)

  3. and then install it. (Note: if it is already installed then remove the package before installing it.)

  4. update your chrome driver from here: http://chromedriver.chromium.org/downloads and save it to your local machine and give the path of it into your code.(var driver = new ChromeDriver(@"C:\Libraries");)

Solution 2:[2]

go to https://chromedriver.chromium.org/ and download the latest stable version of chromedriver and download it in your project folder.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Mirka
Solution 2 Amaan Ram