3

With chromedriver version above 115, this has stopped working:

driver = webdriver.Chrome()

with the error

There is no such driver by url https://chromedriver.storage.googleapis.com/LATEST_RELEASE_115.0.5790.

As suggested here selenium webdriver chrome 115 stopped working, this works:

service = Service(ChromeDriverManager(version="114.0.5735.90").install())

But that doesn't seem like a good ongoing solution. Is there a better way?

paul
  • 89
  • 1
  • 9
  • Check these answers - https://stackoverflow.com/a/76752843/7598774 or https://stackoverflow.com/a/76728148/7598774 – Shawn Jul 26 '23 at 13:12

7 Answers7

2

The only thing that worked is updating the webdriver-manager to 4.0.0

With this package update the old syntax

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

started to work again :)

The Service argument is available only from Selenium 4.10

Catalin
  • 282
  • 1
  • 14
1

You can use WebDriver-Manager to automaticly update the driver's version.
Install webdriver-manager:

pip install webdriver-manager

For Chrome:

# selenium 3
from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(ChromeDriverManager().install())
# selenium 4
from selenium import webdriver
from selenium.webdriver.chrome.service import Service as ChromeService
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(service=ChromeService(ChromeDriverManager().install()))
I.sh.
  • 252
  • 3
  • 13
  • This won't work with 4.10 (arguments changed). – Wyrmwood Jul 25 '23 at 20:05
  • This worked on my notebook, but on my imac, it doesn't. I still get the error ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/115.0.5790/chromedriver_mac64.zip – paul Jul 31 '23 at 09:59
  • That's correct - the last released version for mac is: 114.0.5735.90/chromedriver_mac64.zip you can find all versions here: https://chromedriver.storage.googleapis.com/ – I.sh. Jul 31 '23 at 15:12
  • In addition try to clean the project - right click on the project and select - clean Python compiled files – I.sh. Jul 31 '23 at 15:22
0

You may try this way:

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager

driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))

and you'll need to install

pip install selenium
pip install webdriver-manager

references:

Ajeet Verma
  • 2,938
  • 3
  • 13
  • 24
0
pip install -U selenium webdriver-manager

The driver options changed, even though the major version remained, (thus the api is incompatible, bad selenium)

from selenium import webdriver
from webdriver_manager.chrome import ChromeDriverManager

options = webdriver.ChromeOptions()
# do options stuff
driver_path = ChromeDriverManager().install()
driver = webdriver.Chrome(options=options)  # not chrome_options, no path argument
driver.service.path = driver_path
Wyrmwood
  • 3,340
  • 29
  • 33
0

You can use webdriver-auto-update package to automatically download/update the driver's version.
Install webdriver-auto-update:

pip install webdriver-auto-update

For Chrome:

from selenium import webdriver
from webdriver_auto_update import check_driver

check_driver("C:\\Users\\User\\PycharmProjects") # dir path to store chromedriver in

driver = webdriver.Chrome()
driver.get('your_website.com')

Plz note - the dir must already be existed, it doesn't creates it for you.

I personally preffered to use os.getcwd() + "\\drivers" path os.getcwd() to get the current dir, and the drivers folder, which I've added to the .gitignore file.

I.sh.
  • 252
  • 3
  • 13
0

I have updated chromedriver to version 115.0.5790.110 on my mac, and it solved the binary not found issue.

https://edgedl.me.gvt1.com/edgedl/chrome/chrome-for-testing/115.0.5790.110/mac-arm64/chromedriver-mac-arm64.zip

Shailesh
  • 1
  • 3
0

I originally came here a few months ago with the same error, and one of the solutions provided in this thread worked. However, it stopped working and it took me some time to find an answer. Check this post for another way to solve any error regarding chromedriver version. I tried it and it solved the issue right away!

eggman
  • 137
  • 1
  • 1
  • 4
  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Aug 20 '23 at 11:31