capture_baseline
Saves a screenshot of a URL as a visual baseline. Use on a known-good page, then compare later screenshots to detect visual regressions.
Instructions
Capture a screenshot of a URL and save it as the visual baseline under a given name. Run this once on a known-good version of the page. Later use compare_visual against the same name to detect regressions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | Yes | URL to capture, e.g. http://localhost:3000/login | |
| name | Yes | Baseline identifier, e.g. 'login-page'. Used as the filename. | |
| width | No | Viewport width in px (default 1280) | |
| height | No | Viewport height in px (default 720) | |
| waitMs | No | Extra wait after network idle, in ms (default 500) | |
| fullPage | No | Capture the entire scrollable page (default true) | |
| selector | No | CSS selector to capture only one element instead of the page | |
| maskSelectors | No | CSS selectors for dynamic regions to mask out (timestamps, ads, random content) |