compare_screenshot
Compare the current page screenshot with a saved baseline to detect visual changes. Sets a new baseline on first run, returns pixel diff percentage, and supports threshold-based pass/fail checks.
Instructions
Compare the current page screenshot against a saved baseline. On first run (or with update_baseline=true) saves the baseline. Returns the pixel diff percentage. Install Pillow for accurate pixel comparison.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Baseline name e.g. 'homepage' | default |
| threshold | No | Max allowed diff % before failure | |
| update_baseline | No |