my dears,
can you please help to solve the problem? My browser no longer opens during the run. Thank you very much.
I got the following error since yesterday:
ValueError: There is no such driver by url https://chromedriver.storage.googleapis.com/LATEST_RELEASE_115.0.5790
my code look like this at the beginning:
import pyautogui
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By
from selenium.webdriver.chrome.options import Options
from webdriver_manager.chrome import ChromeDriverManager
from pynput.keyboard import Key, Controller
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
options = Options()
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=options)```
selenium
4.10.0
and newer includes the driver manager, so you can do this:
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
service = Service()
options = webdriver.ChromeOptions()
driver = webdriver.Chrome(service=service, options=options)
# ...
driver.quit()
If the driver isn't found on your system PATH, Selenium Manager will automatically download it.
If you're wondering why you're now seeing errors for ChromeDriverManager
, it's because https://chromedriver.chromium.org/downloads only goes up to version 114 due to driver restructuring by the Chromium Team for the new Chrome-for-Testing.
There's also the SeleniumBase Python selenium framework, which already has a fix for the Chrome 115 issue in the latest version: (After pip install seleniumbase
, run the following with python
):
from seleniumbase import Driver
driver = Driver(browser="chrome", headless=False)
# ...
driver.quit()
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