Script to install the latest versions of chromedriver and geckodriver on travis
Project description
install-webdrivers
Easy-to-use script to install the latest versions of chromedriver and geckodriver on Travis-CI.
Installation
You can install this command directly from PyPI using pip as follows:
$ pip install tchappui-webdrivers
User guide
After having installed tchappui-webdrivers from PyPI, simply install the last stable versions of chromedriver and geckdriver using the install-webdrivers command. Here is a sample .travis.yml file as an example django project:
dist: bionic language: python python: - '3.8' addons: # ajouter uniquement les navigateurs utilisés chrome: stable firefox: latest branches: only: - staging install: - pip install tchappui-webdrivers before_script: - install-webdrivers --path /usr/local/bin/ env: global: # we suppose the settings for Travis are in a dedicated file - DJANGO_SETTINGS_MODULE="config.settings.travis" services: - postgresql script: - python manage.py test
Then, in your tests, start both chrome and firefox in headless mode:
from selenium import webdriver
chrome_options = webdriver.ChromeOptions()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--remote-debugging-port=9222')
chrome_options.add_argument('--window-size=1920x1080')
firefox_options = webdriver.FirefoxOptions()
firefox_options.headless = True
firefox_options.add_argument('--window-size=1920x1080')
History
0.1.0 (2020-05-01)
First release on PyPI.
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
tchappui-webdrivers-0.3.5.tar.gz
(16.5 kB
view hashes)
Built Distribution
Close
Hashes for tchappui-webdrivers-0.3.5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 538f29f6b650b983d476d78b6fc333d47c2e1582610b5ac07de294ee8c901ddc |
|
MD5 | 686ae0e795195de794f8adda2c96f51d |
|
BLAKE2b-256 | c25363adcdfce1878435f12a060b871664cf3e2b32efde60411d6fe2093470b5 |
Close
Hashes for tchappui_webdrivers-0.3.5-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2c26f5a753509b753f2556f8cb5b0974b029da026795832889f5e65d0c37716f |
|
MD5 | ff7475a5425517d68f8e991f1139d4db |
|
BLAKE2b-256 | 2d65c03580ea48cda067ac33baf70728d2abc05d192148df6ca92828aa96d29f |