It is a fast and convenience package that can automatically download or update Selenium webdriver binaries and their browsers for different OS.
Use the package manager pip to install selenium_driver_updater.
pip install selenium-driver-updater
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')
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
For installing or updating chromedriver binary
All supported OS for this driver are:
- Windows
- Linux
- MacOS
- MacOS with M1
For installing or updating geckodriver binary
All supported OS's for this driver are:
- Windows
- Windows ARM
- Linux
- Linux ARM
- MacOS
- MacOS with M1
For installing or updating operadriver binary
All supported OS's for this driver are:
- Windows
- Linux
- MacOS
For installing or updating edgedriver binary
All supported OS's for this driver are:
- Windows
- Windows ARM
- MacOS
- MacOS with M1
- Linux
For installing or updating phantomjs binary
All supported OS's for this driver are:
- Windows
- MacOS
- Linux
For installing or updating safaridriver binary
All supported OS's for this driver are:
- MacOS
For updating chrome browser
All supported OS's for this browser are:
- MacOS
For updating firefox browser
All supported OS's for this browser are:
- MacOS
For updating opera browser
All supported OS's for this browser are:
- Windows 32 / 64 / ARM
- MacOS
For updating edge browser
All supported OS's for this browser are:
- MacOS