screenshot_diff
Save a named baseline of a viewport or element, then compare subsequent captures against it. Returns changed-pixel percentage and a red-highlighted diff image to identify visual regressions.
Instructions
Visual regression: save a named baseline (viewport or element), compare later — returns changed-pixel % and red-highlighted diff image. Baselines are in-memory (lost on service worker restart).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Baseline id: reuse the same one to compare across runs | default |
| action | Yes | baseline stores, compare measures against it, 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) | |
| threshold | No | Per-channel tolerance 0-255 |