maxDiffPixelRatio

A Playwright screenshot option giving the fraction of pixels, from 0 to 1, that may differ before the comparison fails.

In more detail

maxDiffPixelRatio: 0.01 allows 1% of pixels to change, absorbing tiny rendering noise such as subpixel anti-aliasing while still catching real layout changes. A related option, threshold, sets how different one pixel's colour must be to count.

Related terms

Taught in

References