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.1.tar.gz
(11.0 kB
view hashes)
Built Distribution
Close
Hashes for tchappui-webdrivers-0.3.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b7e0fe85ec3c0d322c90d94376db0dfef340eeef0a22604d7fa4d848b1256314 |
|
MD5 | 0ab9f01f93feed6266292fb5138f3a34 |
|
BLAKE2b-256 | 4fd1f4c1c0851f0cf06ce4412bdb4273a0d3b77cc5a7047e1984e84b5fc3e225 |
Close
Hashes for tchappui_webdrivers-0.3.1-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b0963b29ab79150db2a32ca003bb54665eaafd7bb3ce90e395493ab8fb8b5bc5 |
|
MD5 | a276296ab613321b51c7a21918e77a37 |
|
BLAKE2b-256 | 9e68f2e69deafac12610330340d91326b6dfa26fd385519a7bf008bfb3e1646e |