pytest-splinter.readthedocs.io - Welcome to pytest-splinter’s documentation! — pytest-splinter 3.3.2 documentation

Example domain paragraphs

pip install pytest - splinter Features ¶ The plugin provides a set of fixtures to use splinter for browser testing with pytest

@pytest . fixture def admin_browser ( request , browser_instance_getter ): """Admin browser fixture.""" # browser_instance_getter function receives parent fixture -- our admin_browser return browser_instance_getter ( request , admin_browser ) def test_2_browsers ( browser , admin_browser ): """Test using 2 browsers at the same time.""" browser . visit ( 'http://google.com' ) admin_browser . visit ( 'http://admin.example.com' ) splinter_selenium_implicit_wait Implicit wait timeout to be passed to Selenium we

import pytest from selenium import webdriver @pytest . fixture ( scope = 'session' ) def splinter_driver_kwargs (): """Override Chrome WebDriver options""" chrome_options = webdriver . ChromeOptions () # List of Chromium Command Line Switches # https://peter.sh/experiments/chromium-command-line-switches/ chrome_options . add_argument ( "--window-size=1440,1200" ) chrome_options . add_argument ( "--ignore-ssl-errors=yes" ) chrome_options . add_argument ( "--ignore-certificate-errors" ) return { "options" : c

Links to pytest-splinter.readthedocs.io (1)