Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for tchappui-webdrivers, version 0.3.7
Filename, size File type Python version Upload date Hashes
Filename, size tchappui_webdrivers-0.3.7-py2.py3-none-any.whl (5.1 kB) File type Wheel Python version py2.py3 Upload date Hashes View
Filename, size tchappui-webdrivers-0.3.7.tar.gz (16.5 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page