Chrome Driver Manager not working on Chrome Version:115.0.5790
Asked Answered
H

1

6

I have used ChromeDriverManager for over 1 year and no issues with it when Chrome browser has been updated but today I have the following error message:

There is no such driver by URL https://chromedriver.storage.googleapis.com/115.0.5790/chromedriver_win32.zip

I can see that by manually opening the link that the URL doesn't exist.

Any help would be great, Ideally still using ChromeDriverManager but if not any workaround would be good for now as there are a lot of dependencies on this package for me.

This is my current code:

from selenium import webdriver
from selenium.common.exceptions import WebDriverException
from selenium.webdriver.chrome.options import Options as ChromeOptions
from selenium.webdriver.common.by import By
from selenium.webdriver.common.keys import Keys
from webdriver_manager.chrome import ChromeDriverManager

    def __init__(self):
        # Initialize any necessary attributes here
        self.headless_mode = False

    def chrome_driver(self):

        # Set webdriver options
        options = ChromeOptions()
        options.headless = self.headless_mode

        # Add options arguments to webdriver
        options.add_argument("--log-level=3")
        options.add_argument("--start-maximized")
        options.add_argument('--no-sandbox')
        options.add_argument('--disable-dev-shm-usage')
        options.add_experimental_option("prefs", {
            "download.default_directory": f'r"D:\\Users\\{os.getlogin()}\\Downloads\\"',
            "download.prompt_for_download": False,
            "download.directory_upgrade": True,
            "safebrowsing.enabled": True
        })

        # Create webdriver with options from above
        driver_for_chrome = webdriver.Chrome(ChromeDriverManager().install(), options=options)

        # Return the driver to be used in other scripts
        return driver_for_chrome'
Helminth answered 26/7, 2023 at 11:43 Comment(3)
Check this answer - https://mcmap.net/q/1918665/-i-cant-install-chromedrivermanager-with-chromedrivermanager-installUnseasoned
Hi, The suggested post solved the issue I was having, thanks.Helminth
I ended up pinning to version "114.0.5735.90", at least for now.Substituent
A
0

If you don't want to use Selenium 4.10, you can use the old one also.

For me neither of this worked (and couldn't update the Selenium to 4.10 on that VM).

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 :)

Artificiality answered 1/8, 2023 at 13:14 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.