All docs
Comparisons3 min readUpdated

UI Verify vs Playwright screenshots

Playwright's toHaveScreenshot diffs screenshots locally against committed baselines. UI Verify adds hosted baselines, a review UI, an AI judge, and agent review.

Playwright's built-in visual comparison is free and lives in your test runner: it screenshots a page and diffs it against a baseline image committed next to the test. UI Verify runs the same comparison but moves the baselines, the review, and the judgment off your repo and CI. For the wider landscape, see visual regression testing tools compared.

What UI Verify and Playwright share

  • Real-browser screenshots diffed pixel by pixel against a baseline.
  • You can drive a real page or a component, not just a Storybook story.
  • Knobs to tame false diffs - Playwright has mask, stylePath, threshold, and maxDiffPixelRatio, and disables animations by default.

Where UI Verify differs from Playwright's screenshots

  • Determinism is handled for you. Playwright gives you the knobs; you still own the setup and the cross-OS baseline problem - a screenshot taken on your Mac will not match one taken on the CI Linux box, so teams pin a Docker image and keep per-OS baselines. UI Verify renders on a fixed fleet and neutralizes the common flake sources automatically - a seeded Math.random, inlined cross-origin fonts, a fetch-once image cache, a hermetic network, and prefers-reduced-motion. See Fix flaky visual tests.
  • Observability over changes, not a failed assertion. Native Playwright reports a visual change as a failed test; it renders a local diff in the HTML report, but there is no history, no hosted review, and no pull-request check. UI Verify gives a review queue, per-story history, and a PR check - a change is something you accept or reject, not a test you re-run with --update-snapshots.
  • Hosted, git-aware baselines. No screenshot images committed to your repo and no per-OS baseline files to juggle - baselines live in the service, one per branch, resolved from your git history.
  • An AI judge and agent review. UI Verify labels each change a regression or an intended change and holds the pull request when it flags a regression, and exposes the exact diffs and verdicts over MCP so your coding agent can accept the intended ones. Playwright ships its own MCP and test agents, but they drive the browser and generate tests - they do not review visual diffs. See the AI judge and Triage with your agent.
  • Automatic flake detection. A change that does not reproduce on a re-render is auto-ignored, so a flaky screenshot does not fail your build. See automatic flake detection.

When Playwright's built-in screenshots are the better choice

  • You have a handful of screenshots and are happy to review the diffs yourself.
  • You already run Playwright and want the visual check to gate entirely inside your own CI.
  • You do not need hosted history, a review UI, or an AI judge triaging each change.
  • You are not working with coding agents that review visual diffs and accept baselines over MCP.

Is Playwright's toHaveScreenshot enough for visual testing?

For a small suite you review yourself, yes - it is free, local, and built in. It starts to strain when the baselines multiply: every screenshot is a PNG or WebP committed to your repo, cross-OS differences push you into a pinned Docker image, and a change is a failed test with no history or review UI. That is the point where a hosted tool earns its keep.

Do I have to commit screenshot baselines with UI Verify?

No. UI Verify stores baselines in the service, one per branch and resolved from your git history, so there are no screenshot images in your repo and no per-OS baseline files to maintain.

Ready to try it? The Playwright quickstart turns your existing Playwright tests into a visual check on your PRs.

Visual testing for agents

UI Verify captures your UI on every pull request and an AI judge tells an intended change from a real regression. See how it works.

Get started