I hid the Save button on a mobile form and ran my Playwright screenshot test. It passed. I ran it again against the same reference. Same result.
The clue was in the VisTest report:
{"status": "passed", "suppressed_by_rule": {"scrollbar": 1}}
The fixed bottom navigation covered the label. The screenshot of the form showed a blue strip at the edge. Hiding Save with CSS made that strip disappear, and the engine treated it as scrollbar noise.
Two PNGs, two explanations
I tried a tighter rule that required a scrollbar to reach the corner. It caught the clipped button and started flagging real inset scrollbars.
Then I drew an inset scrollbar with a transparent thumb and a button with the same size, position, and color. Chromium produced identical pixels for the two cases. The screenshots matched again after I removed each element. The browser reserved space for the scrollbar and none for the button.
Run python -m scripts.diagnose_scrollbars from the v0.2.0a6 checkout with the browser extra and Playwright Chromium installed. The script prints which cases passed and whether the two image pairs match. Chromium probe
Why 0.2.0a6 still passed
VisTest 0.2.0a6 already used browser observations in some screenshot comparisons. The form was 612.5 CSS pixels high and Playwright captured it in a PNG 613 pixels high. The capture code skipped fractional bounds, so the comparison had only the pixels. Capture code
Here's a check you can try on your own tests. Hide the main action with visibility: hidden, keep the reference image, and see if your screenshot test fails. For a Save button, also change a value, click Save, and check the value after a reload.
What is one change your visual test should fail on? Have you tried making it on purpose?
Originally published on Hashnode. Drafted with AI from the test artifacts and a rerun of the Chromium probe.


Top comments (0)