screenshot_diff
Compare screenshots against a saved baseline or between two URLs to detect visual changes, showing pixel-diff percentage and red-highlighted areas.
Instructions
Visual regression: save a named baseline (viewport, element, or a PNG such as the design mockup) and compare later — changed-pixel % and a red-highlighted diff; or compare_urls: production vs staging in this tab, pixels plus text diff, logged-in pages included. Baselines are in-memory (lost on service worker restart).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mask | No | compare_urls: selectors hidden on both pages (dates, carousels, ads) | |
| name | No | Baseline id: reuse the same one to compare across runs | default |
| url_a | No | compare_urls: reference page, e.g. production | |
| url_b | No | compare_urls: page under test, e.g. staging or a PR preview | |
| action | Yes | baseline stores, compare measures against it, compare_urls diffs url_a vs url_b here, clear drops baselines | |
| tab_id | No | Target tab; omitted = last tab navigated in this session, else the active one | |
| selector | No | Capture one element (default viewport) | |
| from_file | No | action=baseline: take it from this PNG (design mockup) instead of capturing | |
| threshold | No | Per-channel tolerance 0-255 |