VisualCI vs Playwright toHaveScreenshot
Checked against Playwright's documentation on 1 December 2026.
Playwright Test compares screenshots itself: await expect(page).toHaveScreenshot() writes a reference image on the
first run and compares against it after that. It's free and already installed if you use Playwright. VisualCI doesn't
replace it. Your Playwright tests keep taking the screenshots, and VisualCI stores the baselines, compares them, and
lets your coding agent review each change.
At a glance
| VisualCI | Playwright toHaveScreenshot |
|
|---|---|---|
| Who takes the screenshot | Your tests (Playwright or anything else) | Playwright |
| Browsers | The ones your tests run | Chromium, Firefox and WebKit |
| Where baselines live | On VisualCI, for each branch, found from the nearest ancestor commit | In git, next to each test file, one per browser and OS |
| A Mac and a Linux CI machine | Each platform tag keeps its own baseline. PDFs are rendered by VisualCI, so they match everywhere | The docs advise taking baselines in the same environment that checks them |
| When a change is found | CI passes and the GitHub check waits for approval. strict mode fails CI instead |
The assertion fails the test |
| Approving a change | Your agent approves it over MCP, or a person does in the web app. Every approval is recorded on the build | Re-run with --update-snapshots and commit the new images |
| Reviewing a diff | Side by side, diff image or slider in the web app; images and changed regions over MCP | Diff, actual and expected images in UI Mode or the HTML report |
| PDFs | Yes, with a text diff for every page | No |
| JSON, HTML and text snapshots | Yes. Jest, Vitest, insta, syrupy and rspec-snapshot files upload as they are | toMatchSnapshot compares text, and ARIA snapshots store the accessibility tree |
| Cost | Free: 25,000 credits a month. Team: $29 a month for 1,000,000 credits | Free |
| Licence | Apache-2.0 | Apache-2.0 |
Using them together
Take screenshots with Playwright's page.screenshot() and upload the folder with the VisualCI CLI, as the
Playwright guide shows. Playwright keeps its masking, animation and waiting options,
and VisualCI handles baselines and review.
When Playwright on its own is enough
- One person or a small team reviews screenshot changes, and committing new images to git is fine.
- Everyone runs the tests in the same container, so baselines match.
- You don't want to send screenshots to a service.
When to add VisualCI
- Coding agents open your pull requests, and you want them to review a visual change instead of updating the baseline.
- You want CI to stay green while a change waits for review, instead of a failing test.
- You'd rather not keep screenshot images in git.
- Your app also generates PDFs, or your tests write JSON and text snapshots.
FAQ
Can I keep my toHaveScreenshot assertions?
Yes, but each failure still fails the test. To have VisualCI review a change, save the screenshot with
page.screenshot() and upload it.
Does VisualCI run my Playwright tests? No. Your CI runs them. The VisualCI CLI uploads what they wrote.