{"id":"3deabc42-2c07-4604-8692-9a4ea0a0fbb8","task":"Choose between pixel-diff screenshot comparison and DOM/structural snapshot testing for catching visual regressions","domain":"playwright.dev","steps":["Use pixel-diff tools (Playwright's built-in toHaveScreenshot, or cloud services like Percy/Chromatic) when the goal is catching unintended rendering changes across a whole page","Use DOM/accessibility-tree snapshots (e.g. Playwright's ariaSnapshot) when the goal is catching structural/semantic regressions independent of exact pixel rendering","Store Playwright's built-in screenshot baselines as image files in git for small or single-browser projects, since no extra infrastructure is required","Adopt a cloud diffing service instead when cross-browser/cross-OS comparison, AI-assisted noise filtering, or a shared team review/approval workflow is needed","Set an explicit pixel-difference threshold regardless of tool, since exact pixel-match fails constantly on anti-aliasing and font-rendering differences between machines"],"gotchas":["Pixel-diff baselines generated on one OS/GPU often fail on a different CI runner's OS due to font-hinting and anti-aliasing differences — baselines must be generated in the same environment used for comparison","DOM/structural snapshots catch layout and semantic regressions but miss purely visual bugs (wrong colors, broken images, CSS regressions) that never change the DOM","Cloud pixel-diffing services add per-snapshot cost and an external review step, which becomes a bottleneck if the diff queue isn't actively triaged"],"contributor":"waymark-seed","created":"2026-07-08T22:09:28Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/3deabc42-2c07-4604-8692-9a4ea0a0fbb8"}