Skip to main content

Download or update your Selenium driver binaries and their browsers automatically with this package

Project description

selenium_driver_updater

PyPI version License: MIT Downloads Downloads Downloads Donate with Bitcoin Donate with Ethereum

Windows macOS Ubuntu

It is a fast and convenience package that can automatically download or update Selenium webdriver binaries and their browsers for different OS.

Installation

Use the package manager pip to install selenium_driver_updater.

pip install selenium-driver-updater

Usage in code

This example shows how you can use this library to download chromedriver binary and use it immediately.

from selenium_driver_updater import DriverUpdater
from selenium import webdriver
import os

base_dir = os.path.dirname(os.path.abspath(__file__))

filename = DriverUpdater.install(path=base_dir, driver_name=DriverUpdater.chromedriver, upgrade=True, check_driver_is_up_to_date=True)

driver = webdriver.Chrome(filename)
driver.get('https://google.com')

Or you can use library to download and update chromedriver and geckodriver binaries at the same time.

from selenium_driver_updater import DriverUpdater
from selenium import webdriver
import os

base_dir = os.path.dirname(os.path.abspath(__file__))
list_drivers = [DriverUpdater.chromedriver, DriverUpdater.geckodriver]

filenames = DriverUpdater.install(path=base_dir, driver_name=list_drivers, upgrade=True, check_driver_is_up_to_date=True)
print(filenames)

driver_chrome = webdriver.Chrome(filename[0])
driver_chrome.get('https://google.com')

driver_firefox = webdriver.Firefox(filename[1])
driver_firefox.get('https://google.com')

Usage with help of command line

Use

selenium-driver-updater --help

To see all available arguments and commands

This example shows how you can use this console updater to download chromedriver to current dir

selenium-driver-updater -d chromedriver

Or you can use console updater to download chromedriver and geckodriver at the same time

selenium-driver-updater -d chromedriver,geckodriver

Supported Selenium Binaries

Chromedriver

DriverUpdater.chromedriver

For installing or updating chromedriver binary

All supported OS for this driver are:

  • Windows
  • Linux
  • MacOS
  • MacOS with M1

Geckodriver

DriverUpdater.geckodriver

For installing or updating geckodriver binary

All supported OS's for this driver are:

  • Windows
  • Windows ARM
  • Linux
  • Linux ARM
  • MacOS
  • MacOS with M1

Operadriver

DriverUpdater.operadriver

For installing or updating operadriver binary

All supported OS's for this driver are:

  • Windows
  • Linux
  • MacOS

Edgedriver

DriverUpdater.edgedriver

For installing or updating edgedriver binary

All supported OS's for this driver are:

  • Windows
  • Windows ARM
  • MacOS
  • MacOS with M1
  • Linux

PhantomJS

DriverUpdater.phantomjs

For installing or updating phantomjs binary

All supported OS's for this driver are:

  • Windows
  • MacOS
  • Linux

SafariDriver

DriverUpdater.safaridriver

For installing or updating safaridriver binary

All supported OS's for this driver are:

  • MacOS

Supported browsers for updates

Chrome Browser

For updating chrome browser

All supported OS's for this browser are:

  • MacOS

Firefox Browser

For updating firefox browser

All supported OS's for this browser are:

  • MacOS

Opera Browser

For updating opera browser

All supported OS's for this browser are:

  • Windows 32 / 64 / ARM
  • MacOS

Edge Browser

For updating edge browser

All supported OS's for this browser are:

  • MacOS

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

selenium_driver_updater-6.0.2.tar.gz (27.7 kB view details)

Uploaded Source

File details

Details for the file selenium_driver_updater-6.0.2.tar.gz.

File metadata

File hashes

Hashes for selenium_driver_updater-6.0.2.tar.gz
Algorithm Hash digest
SHA256 6d06dfd1cf809b1bf7686c8b36f5608373cd79f8aa39d35df1376b82f0b07886
MD5 680062cde16d5c3e3d56f7ccc8ca0869
BLAKE2b-256 0814f242550266bc29adf7bfb725e80101346cbe69f6235e926bd497ffcb3832

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page