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?
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
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()))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With