Skip to content

Glossary: Testing Web Apps

toHaveScreenshot

Also written: mask, maxDiffPixels, --update-snapshots, -u

A Playwright assertion that compares the page or one element with a baseline image. `mask` hides changing parts, `maxDiffPixels` forgives small noise and `--update-snapshots` accepts a change.

Where the book teaches it

Related terms

BaselineDiffVisual regression test