percy-selenium-python
Percy visual testing for Python Selenium.
Installation
npm install @percy/cli:
$ npm install --save-dev @percy/cli
pip install Percy selenium package:
$ pip install percy-selenium
Usage
This is an example test using the percy_snapshot function.
from percy import percy_snapshot
browser = webdriver.Firefox()
browser.get('http://example.com')
# take a snapshot
percy_snapshot(browser, 'Python example')
Running the test above normally will result in the following log:
[percy] Percy is not running, disabling snapshots
When running with percy exec, and your project's
PERCY_TOKEN, a new Percy build will be created and snapshots will be uploaded to your project.
$ export PERCY_TOKEN=[your-project-token]
$ percy exec -- [python test command]
[percy] Percy has started!
[percy] Created build #1: https://percy.io/[your-project]
[percy] Snapshot taken "Python example"
[percy] Stopping percy...
[percy] Finalized build #1: https://percy.io/[your-project]
[percy] Done!
Configuration
percy_snapshot(driver, name[, **kwargs])
driver(required) - A selenium-webdriver driver instancename(required) - The snapshot name; must be unique to each snapshot- Additional snapshot options (overrides any project options) (
**kwargs**):widths- An array of widths to take screenshots atmin_height- The minimum viewport height to take screenshots atpercy_css- Percy specific CSS only applied in Percy's rendering environmentrequest_headers- Headers that should be used during asset discoveryenable_javascript- Enable JavaScript in Percy's rendering environment
Migrating Config
If you have a previous Percy configuration file, migrate it to the newest version with the
config:migrate command:
$ percy config:migrate
Metadata
Release files for percy-python-selenium 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| percy-python-selenium-1.0.0.tar.gz | 2.7 kB | Without provenance | Details for percy-python-selenium-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| percy_python_selenium-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for percy_python_selenium-1.0.0-py3-none-any.whl |
Total release size: 5.8 kB
Release files / percy-python-selenium-1.0.0.tar.gz
| Download URL | percy-python-selenium-1.0.0.tar.gz |
|---|---|
| Size | 2.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d50975cc7d923b7ce470f7f56f8d3ebcb33cb4a2d53f865ccd9c65d207a77252
|
|
BLAKE2b-256 checksum How to use checksums |
0f6f96745634ec04a48801bf49cba166696b39f239a03caab1743c501ccc6131
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
|
Release files / percy_python_selenium-1.0.0-py3-none-any.whl
| Download URL | percy_python_selenium-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4879c6145266aaecce6c5fa14de50bb578bfdff02beb85187e4180d110c6fa4c
|
|
BLAKE2b-256 checksum How to use checksums |
3381ea79b5b3c64fcfcea0be2416ce8b5b8c619a53dbd9a3ced587ce2bafb920
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.0
|
Security for percy-python-selenium 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.