Download or update your Selenium driver binaries and their browsers automatically with this package
Project description
selenium_driver_updater
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. The chromedriver will be downloaded to base directory.
from selenium_driver_updater import DriverUpdater
from selenium import webdriver
filename = DriverUpdater.install(DriverUpdater.chromedriver)
driver = webdriver.Chrome(filename)
driver.get('https://google.com')
Or you can specify a path where you want to download a chromedriver to
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)
driver = webdriver.Chrome(filename)
driver.get('https://google.com')
You can also specify the version type (beta, dev, canary) you want to download.
from selenium_driver_updater import DriverUpdater
from selenium import webdriver
filename = DriverUpdater.install(driver_name=DriverUpdater.chromedriver, version=DriverUpdater.chromedriver_beta)
driver = webdriver.Chrome(filename)
driver.get('https://google.com')
You can also 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)
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
Or you can use alias
selupd --help
for easier use
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 on M-based processors
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 on M-based processors
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 on M-based processors
- Linux
SafariDriver
DriverUpdater.safaridriver
For installing or updating safaridriver binary
All supported OS's for this driver are:
- MacOS
Supported browsers for checking version
Chrome Browser
For checking version chrome browser
Firefox Browser
For checking version firefox browser
Opera Browser
For checking version opera browser
Edge Browser
For checking version edge browser
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
Built Distribution
File details
Details for the file selenium_driver_updater-7.0.0.tar.gz
.
File metadata
- Download URL: selenium_driver_updater-7.0.0.tar.gz
- Upload date:
- Size: 24.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bc487b8f1e02f5e6e8a0db8d5ed9ffe007fd7d1b2814bc4726c3cfee1197918e |
|
MD5 | 4ecf7cfaf894dd524e9393c55bdaef8e |
|
BLAKE2b-256 | f77e085b4185984c5ae9e827d4a16ea6ab44eeb771eaa6f09d9852826684301a |
Provenance
File details
Details for the file selenium_driver_updater-7.0.0-py3-none-any.whl
.
File metadata
- Download URL: selenium_driver_updater-7.0.0-py3-none-any.whl
- Upload date:
- Size: 37.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 610e9e7df082cc0862e94a94b3adb2a12a9237f34857398d017a60d121b71cb3 |
|
MD5 | da2df73511d512bf09562065b6ad0e19 |
|
BLAKE2b-256 | 6237001bc490c7849694ddd68d57015d28f7deecb6d5c1de3d8580bb52b71447 |