Your first evidence¶
Capture evidence in a Robot test and generate HTML afterwards. Use Python 3.12+, Robot Framework 7 and SeleniumLibrary for browser captures.
1. Install the library¶
The package is published on PyPI.
Pin a package version in your team's dependency file for reproducible installation. The repository contains current source code.
2. Record a capture¶
Save this as evidence.robot. Use BROWSER:chrome for a visible window or keep headlesschrome for headless execution.
Start without milestones
Direct evidence works without groups. Add optional milestones to group a business flow.
3. Run and generate¶
Open the file in reports/. Its images, styles and controls are embedded, so reading it requires no Internet connection.
One directory per execution
Generation includes every discovered case.json. Use a new directory for each execution to avoid mixing prior results.
Continue with milestones and metadata Visual examples
Output directory¶
Normally import EvidenceReporter without output arguments and run robot --outputdir results tests. Evidence goes into results/evidence. To choose a separate location, use robot --outputdir results --variable EVIDENCE_OUTPUT_DIR:artifacts/evidence tests. An explicit library output_dir still takes precedence for compatibility. For Pabot, see parallel execution.
Choose the right capture¶
| What you want to show | Keyword | When to use it |
|---|---|---|
| Visible browser page | Capture Page Evidence |
A completed screen or confirmation |
| One browser element | Capture Element Evidence |
A specific result, message or component |
| Desktop | Capture Desktop Evidence |
A desktop session where capture is available |
| Existing image file | Attach Image Evidence |
An image produced by another tool |
Check exact arguments and environment requirements in Keyword Reference. Browser page capture records the viewport; it is not a full-page capture.
[{"name": "English", "lang": "en", "link": "/robotframework-evidence-reporter/getting-started/", "fragments": {"your-first-evidence": "your-first-evidence", "1-install-the-library": "1-install-the-library", "2-record-a-capture": "2-record-a-capture", "3-run-and-generate": "3-run-and-generate", "output-directory": "output-directory", "choose-the-right-capture": "choose-the-right-capture"}, "current": true}, {"name": "Espa\u00f1ol", "lang": "es", "link": "/robotframework-evidence-reporter/es/getting-started/", "fragments": {"your-first-evidence": "tu-primera-evidencia", "1-install-the-library": "1-instala-la-libreria", "2-record-a-capture": "2-registra-una-captura", "3-run-and-generate": "3-ejecuta-y-genera", "output-directory": "directorio-de-salida", "choose-the-right-capture": "elige-la-captura-adecuada"}, "current": false}]