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.2.tar.gz
(11.0 kB
view hashes)
Built Distribution
Close
Hashes for tchappui-webdrivers-0.3.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | eccce5136afcff8ab93e2e7cc750d0cf5ddef7f7867232f0abfab28654dfc5a2 |
|
MD5 | c40712a90914b5b11619a80742e9f53b |
|
BLAKE2b-256 | 08ec01efa3df71da8bbc023f0614b0475b0a848d61c6a455456632655b8e0a1c |
Close
Hashes for tchappui_webdrivers-0.3.2-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6e27dae7dcca920fcddb5ffaf19b060825cf2ae6fed14f15f987f969fc391f18 |
|
MD5 | 3397067dd87376116b0d4a4668b94bf7 |
|
BLAKE2b-256 | f8cf55b9c9055eefd906ac3b38cc2fcc1d2c5b92d401c0b1d5edbdf3f644a2df |