Screenshots
Steps for capturing and comparing screenshots.
screenshot
Save a screenshot.
Parameters
Example
compareScreenshot
Compare the current screenshot against a baseline PNG image. Supports element-level cropping via selector for component-level visual regression testing.
Parameters
Example
Tips
- Run with
update: trueto create baselines, then commit to Git. - Run without
updateto compare current state against baselines. - On failure, a diff image is saved to the output directory. The HTML reporter shows the diff inline.