Registry / testing / pytest-splinter

pytest-splinter

JSON →
library3.3.2pypypiunverified

A pytest plugin that integrates the Splinter browser automation library, enabling acceptance testing with multiple browser drivers (Selenium, PhantomJS, etc.) using pytest fixtures. Current version 3.3.2 is stable but in maintenance mode, with infrequent releases.

pip install pytest-splinter
INSTALL
IMPORT
SIG · PYTEST-SPLINTER
P
pytest-splinter
testingpythonv3.3.2
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

browser
✓ pytest.mark.usefixtures('browser') or def test(browser):
✗ from splinter import Browser
Splinter's own Browser can conflict with pytest fixture; use the fixture instead.

Basic test using the `browser` fixture provided by pytest-splinter.

import pytest def test_google(browser): browser.visit('https://www.google.com') assert browser.is_text_present('Google')
Debug
Known issues
breakingpytest-splinter 3.x dropped support for Python 2.7 and older pytest versions. Ensure Python 3.6+ and pytest 3.0+.
fix
Use Python 3.6+ and pytest >=3.0.
affects: >=3.0.0
deprecatedThe `splinter_driver_kwargs` fixture is deprecated in favor of `browser_driver_kwargs`.
fix
Rename fixture from `splinter_driver_kwargs` to `browser_driver_kwargs`.
affects: >=3.1.0
gotchaThe `browser` fixture uses the default Splinter driver (usually `firefox`). To use a different driver, set `splinter_webdriver` in pytest.ini or override the `browser_instance` fixture.
fix
Set pytest.ini: `splinter_webdriver = chrome` or implement a custom `browser_instance` fixture.
affects: all
breakingIn pytest-splinter 3.x, the `browser` fixture no longer starts a browser for tests that don't explicitly use it; you must include it as a parameter. Previously it was autouse.
fix
Explicitly request the `browser` fixture in your test function parameters.
affects: >=3.0.0
Upgrade
Version history
3.3.2latest on PyPI · released Sep 9, 2022
Audit
Dependencies
splinterrequiredCore dependency for browser automation
pytestrequiredTesting framework
Agent activity
4 hits · last 30 days
node
4
Resources
pytest-splinter — pip install pytest-splinter · libregistry