pythonselenium-webdriverselenium-chromedriverwebdriver-managerwebdrivermanager-python

No such driver version 115.0.5790.110 for linux64 error using ChromeDriverManager


I have a python script where it autoinstalls chromedriver with ChromeDriverManager package. Today it gave me an error of:

No such driver version 115.0.5790.110 for linux64

Line of code:

driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()), options=chrome_options)

ChromeDriverManagergoes to the url and istalls LATEST RELEASE of chrome driver. I looked at last modified version, it says on may of 2023. But SO says it is having an issue newly. My script also was working a week ago.

<Contents>
<Key>LATEST_RELEASE</Key>
<Generation>1685523462105569</Generation>
<MetaGeneration>1</MetaGeneration>
<LastModified>2023-05-31T08:57:42.224Z</LastModified>
<ETag>"368684b889419678b04e4899d53d7ab0"</ETag>
<Size>13</Size>
</Contents>

I looked at some SO, as I guess it is related new version of chromedriver release which does not function well?

Could anyone assure me that, I got it right, and that means I need to change script to take the old version of chromedriver from path?


Solution

  • If you are using Chrome version 115 or newer you have to check the Chrome for Testing availability dashboard which provides convenient JSON endpoints for specific ChromeDriver version downloading.


    Selenium Manager

    With the availability of Selenium v4.6 and above you don't need to explicitly download ChromeDriver, GeckoDriver or any browser drivers as such using webdriver_manager. You just need to ensure that the desired browser client i.e. , or is installed.

    Selenium Manager is the new tool integrated with that would help to get a working environment to run Selenium out of the box. Beta 1 of Selenium Manager will configure the browser drivers for Chrome, Firefox, and Edge if they are not present on the PATH.


    Solution

    As a solution you can simply do:

    from selenium import webdriver
    from selenium.webdriver.chrome.options import Options
    
    options = Options()
    options.add_argument("start-maximized")
    driver = webdriver.Chrome(options=options)
    driver.get("https://www.google.com/")
    

    tl; dr

    Chrome for Testing: reliable downloads for browser automation