1

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?

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
miPythOff
  • 43
  • 5
  • i had a very similar error. after a long time of using it, this happened (on windows). So i moved to playwright: https://www.youtube.com/watch?v=qsc4js6DM6g&ab_channel=DarrenLefcoe – D.L Jul 29 '23 at 16:51

1 Answers1

1

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

undetected Selenium
  • 183,867
  • 41
  • 278
  • 352
  • I guess, there is need someone to write an article or make youtube videos for how to use these `API endpoints`, or what is the reason to install `npx puppeter chromium `which version (stable, canary)...before i was downloading chromium, and `chrome.exe` putting their path in the script. Now, there are so many details.. – miPythOff Jul 29 '23 at 21:59
  • 1
    @miPythOff I had been explaining this since Selenium v4.6.0 landed. Unfortunately I'm not a YouTuber :) – undetected Selenium Jul 29 '23 at 22:01