Wopee.io Visual Testing for Robot Framework
wopee_rf adds visual testing to your Robot Framework tests. Your test takes a screenshot at the steps you choose, Wopee.io compares it with the approved baseline, and you review the differences in Commander.
The full guide is at docs.wopee.io/robot-framework.
Install
Python 3.11 or newer:
pip install wopee_rf robotframework robotframework-browser
rfbrowser init chromium
For SeleniumLibrary, install robotframework-seleniumlibrary instead of robotframework-browser.
Configure
Create a .env file next to your tests folder. Copy the URL, project UUID and API key from More › Settings › API Keys in Commander:
WOPEE_API_URL=https://api.wopee.io
WOPEE_PROJECT_UUID=your-project-uuid
WOPEE_API_KEY=your-api-key
WOPEE_SCREENSHOT_VALIDATION_ENABLED=true
WOPEE_DRIVER_LIBRARY=BrowserLibrary
Both last lines are required: without them nothing is sent to Wopee.io. Use WOPEE_DRIVER_LIBRARY=SeleniumLibrary for Selenium tests.
Write a test
tests/saucedemo.robot:
*** Settings ***
Library Browser
Library wopee_rf.Standalone dot_env_path=.env
Test Setup New Page https://www.saucedemo.com
Test Teardown Stop Scenario
*** Variables ***
${USER} standard_user
${SUITE} Robot Framework demo ${{datetime.datetime.now().strftime('%Y-%m-%d %H:%M')}}
*** Test Cases ***
Login And Products
Start Suite suite_name=${SUITE}
Start Scenario scenario_name=Robot Framework: login and products
${login}= Track Fullpage step_name=Login page
Fill Text id=user-name ${USER}
Fill Text id=password secret_sauce
Click id=login-button
Wait For Elements State css=.inventory_list visible
${products}= Track Fullpage step_name=Products
Log To Console \nLogin page: ${login.status} | Products: ${products.status}
Run it from the folder that holds .env:
robot -d reports tests/
The first run creates the baselines (status new). Approve them in Runs in Commander; later runs report ok or unresolved.
All keywords take named arguments only: step_name=Login page, not Login page.
Keywords and listener
| Keyword | What it does |
|---|---|
Start Suite |
Starts a run in Commander. |
Start Scenario |
Starts a scenario that groups the screenshots of one test. |
Track Fullpage |
Takes a full-page screenshot and compares it with the baseline. |
Track Viewport |
Takes a screenshot of the visible area and compares it. |
Track |
Compares a PNG image you pass in as base64. |
Stop Scenario |
Finishes the scenario. Put it in Test Teardown. |
To add visual testing to existing tests without changing them, run them with the listener wopee_rf.Listener and list the keywords to screenshot after in WOPEE_TRACKED_KEYWORDS:
WOPEE_TRACKED_KEYWORDS="Browser.New Page;Browser.Click" \
robot -d reports --listener 'wopee_rf.Listener:dot_env_path=.env' tests/existing_test.robot
Documentation
- Getting started: the complete example, step by step
- Configuration and listener: all settings, the listener, SeleniumLibrary, branches, CI and troubleshooting
- Template project: start from a ready repository
- Examples: more tracking parameters, viewport screenshots, mobile apps and PDF documents
Metadata
Release files for wopee_rf 2.7.3
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 |
|---|---|---|---|---|
| wopee_rf-2.7.3.tar.gz | 123.0 kB | Without provenance | Details for wopee_rf-2.7.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wopee_rf-2.7.3-py3-none-any.whl | Python 3 | none | any | Details for wopee_rf-2.7.3-py3-none-any.whl |
Total release size: 147.0 kB
Release files / wopee_rf-2.7.3.tar.gz
| Download URL | wopee_rf-2.7.3.tar.gz |
|---|---|
| Size | 123.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6e6274c420fc3848e645b1bbdb7c0e381c431862f59bb2f16a488e980d79bb99
|
|
BLAKE2b-256 checksum How to use checksums |
8d77cae25edbcc71c6903805500528ddd0d5484810a7bdf90b772889722d4062
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.18 Linux/7.0.0-1007-azure
|
Release files / wopee_rf-2.7.3-py3-none-any.whl
| Download URL | wopee_rf-2.7.3-py3-none-any.whl |
|---|---|
| Size | 24.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1f036fa830547bd00fabcdd3dac76d887fe3a507f8b4c77623f1fa9855ed9921
|
|
BLAKE2b-256 checksum How to use checksums |
d47c607bc83d55d96a8c428ab0b1f8674e59c5303b20c7a09c245991a272c22f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.11.18 Linux/7.0.0-1007-azure
|
Security for wopee_rf 2.7.3
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.