Auto downloader for chromedrivers
Project description
Cromdriver
Auto downloader for chromedriver
Cromdriver is a library to download automatically the latest Chromedriver release for Selenium.
Import the lib in your Selenium project and it will download and the AppData directory the latest release from http://chromedriver.storage.googleapis.com/index.html.
You can get any version published in the website.
Drivers are downloaded :
- Mac OS X :
~/Library/Application Support/cromdriver
- Unix :
~/.local/share/cromdriver
- Windows :
C:\Users\<username>\AppData\Local\cromdriver\cromdriver
Installation
Install the library with PIP
pip install cromdriver
Usage example
There are two ways to use the library :
Selenium python file
from selenium import webdriver
import cromdriver
driver = webdriver.Chrome()
driver.get('https://www.google.com')
import os
from selenium import webdriver
import cromdriver
path = os.path.join(cromdriver.get_chromedriver_path(), 'chromedriver.exe')
driver = webdriver.Chrome(executable_path=path)
driver.get('https://www.google.com')
CLI
~$ cromdriver get
Downloading version : 86.0.4240.22
Path : C:\Users\gauth\AppData\Local\cromdriver\cromdriver\RELEASE\86.0.4240.22
~$ cromdriver get --version 85.0.4183.87 --platform linux
Downloading version : 85.0.4183.87
Path : C:\Users\gauth\AppData\Local\cromdriver\cromdriver\RELEASE\85.0.4183.87
~$ cromdriver test
Last release on your machine : 86.0.4240.22
Last release on http://chromedriver.storage.googleapis.com/index.html : 86.0.4240.22
~$ cromdriver list
Chromedrivers downloaded :
- 85.0.4183.87
- 86.0.4240.22
~$ cromdriver del --version 85.0.4183.87
Version 85.0.4183.87 deleted
When you use this CLI, PATH environnement variable is not updated. You will need to add the directory path to the ENV.
Release History
- 0.4.0
- CHANGE: Update README.md
- ADD: Github action to deploy in Pypi
- 0.3.0
- ADD : First working version
Meta
Gauthier Chaty – @gokender – gauthier.chaty+github@outlook.com
Distributed under the MIT license. See LICENSE
for more information.
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
Hashes for cromdriver-0.4.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1523a09cc99515bac510ed94f40f26a460bd8a31f443f3ba0ef0828d7ecc9869 |
|
MD5 | 095364f047d7b86a9cc70a4a03fc2a7e |
|
BLAKE2b-256 | 5e9f6b1b46c789d14a0171fef6b2ace548cd3ff8e5c160cb576c2c82aaacbac9 |