Coder Social home page Coder Social logo

competencytestlvl / webdriver_auto_update Goto Github PK

View Code? Open in Web Editor NEW
16.0 16.0 11.0 211 KB

A program to check existing local chrome driver version and automatically downloads the latest available version online.

Home Page: https://pypi.org/project/webdriver-auto-update/

License: MIT License

Python 100.00%
auto browser chrome chromedriver download driver selenium update webdriver

webdriver_auto_update's Issues

Behind Proxy?

I am getting a 407 error behind my corporate proxy when I use this library. Where do I pass in the proxy settings?

webdriver-auto-update 1.2.0 fails

I am running python 3.12.0 on a MacBook M1 with macOS 12.7.1 I just reinstalled webdriver-auto-update and tried to run it. The first problem is this:

File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/webdriver_auto_update/chrome_app_utils.py", line 15, in init
raise NotImplemented(f"Unidentified OS: '{platform}'")

Reason: chrome_app_utils.py line 8 contains "Darwin", which should be "darwin".
I fixed this manually.

Next problem:
File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/webdriver_auto_update/webdriver_manager.py", line 150, in download_latest_version
latest_driver_zip = wget.download(
^^^^^^^^^^^^^^

Reason: webdriver_manager.py line 13 defines CHROMEDRIVER_BASE_URL to a value that leads to a 404 error.

Please look into this.

What to do after main is called?

I'm failing to comprehend out to pass to selenium the driver.
In the past i was doing:

check_driver(os.path.dirname(os.path.abspath(__file__)) + "\\driver\\")
driver = webdriver.Chrome(options=options)

but now

Local chromedriver version: 117.0.5938.149
Latest online chromedriver version: 117.0.5938.149

DevTools listening on ws://127.0.0.1:52863/devtools/browser/84819afd-14d3-4bbc-8226-24fb6a89ff89
Traceback (most recent call last):
  File "****\main.py", line 17, in <module>
    driver = webdriver.Chrome(options=options)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "****Python\Python311\Lib\site-packages\selenium\webdriver\chrome\webdriver.py", line 49, in __init__
    super().__init__(
  File "****Python\Python311\Lib\site-packages\selenium\webdriver\chromium\webdriver.py", line 54, in __init__
    super().__init__(
  File "****Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 206, in __init__
    self.start_session(capabilities)
  File "****Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 291, in start_session
    response = self.execute(Command.NEW_SESSION, caps)["value"]
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "****Python\Python311\Lib\site-packages\selenium\webdriver\remote\webdriver.py", line 346, in execute
    self.error_handler.check_response(response)
  File "****Python\Python311\Lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 245, in check_response
    raise exception_class(message, screen, stacktrace)
selenium.common.exceptions.SessionNotCreatedException: Message: session not created: This version of ChromeDriver only supports Chrome version 114
Current browser version is 117.0.5938.134 with binary path C:\Program Files\Google\Chrome\Application\chrome.exe

as if it is using something else

i've tried adding

options.binary_location = driver_directory

but i get

selenium.common.exceptions.WebDriverException: Message: unknown error: Failed to create Chrome process.

Documentation update for import

update import documentation to include underscores in sub module import

should be:
from webdriver_auto_update import webdriver_auto_update

Chromedriver being installed is not up-to-date.

I am getting the following error:

selenium.common.exceptions.WebDriverException: Message: unknown error: result.webdriverValue.value list is missing or empty in Runtime.callFunctionOn response
  (Session info: chrome=119.0.6045.160)

I read on StackOverflow this error occurs when the Chromedriver doesn't match Chrome. So I checked the version of webdriver and Chrome. The Chrome version listed in the error message is the version of my browser, 19.0.6045.160. I checked and saw that webdriver_auto_update did in fact overwrite the driver today, but the version of the driver installed is only v118.0.5993.70, not 119 . I am concerned that webdriver_auto_update is not up to date for some reason.

I have no control over my Chrome updates at work. I am on Windows.

run arguments must be separated.

rund arguments must be separated (line 131):
cmd_run = subprocess.run(args=["chromedriver", "--version"], capture_output=True, text=True)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.