Visual Testing Insights: What to Look for in UI Changes
Review UI screenshot changes with a repeatable process: choose meaningful states, stabilize rendering, investigate diffs, and keep accessibility checks separate.
Visual testing checks whether a rendered interface changed between an accepted screenshot and a new capture. It helps you find unintended changes, but a diff alone cannot tell you whether a change is a defect or whether the interface is correct. Review the changed areas, check the capture conditions, decide whether the change was intended, and run accessibility checks separately.
This guide explains what to capture, what to inspect in a UI diff, how to reduce rendering noise, and how to choose a review workflow.
1. What visual testing tells you
A visual test exercises an interface, captures screenshots at selected checkpoints, and compares them with stored reference images. A difference is a signal for review. If it is intentional, approve the new image as the baseline; if it is an unintended regression, keep the known-good baseline and report the defect. This capture, compare, and review loop is described in the Applitools visual testing overview.
A screenshot comparison describes rendered appearance at a particular state and capture setup. It does not establish that other viewports work, that the page behaves correctly, or that its semantics and accessible structure are sound.
2. Build a repeatable review process
- Choose representative states. Capture meaningful points in important flows: for example, a completed form, an error state, or a menu after it opens. Prefer checkpoints that answer a review question over arbitrary page captures.
- Establish an accepted baseline. Save a reference screenshot for each checkpoint after the team reviews and approves the UI. Playwright documents creating reference screenshots on an initial run and comparing later runs against them in its visual comparisons guide.
- Keep capture conditions consistent. Record and hold steady the browser and environment where practical. When a diff appears, check the viewport, browser version, operating system, settings, hardware, power source, headless mode, and whether fonts or other assets loaded. Playwright identifies these environment factors as potential sources of screenshot variation.
- Inspect the diff in context. Look at the changed region in both the diff and the full page. Decide whether the change is isolated or has moved nearby content, and whether the new rendering matches the intended UI.
- Make and record a decision. Approve a new baseline only when the change is intentional. Note why it was approved so later reviewers can distinguish planned UI work from accidental drift. If the change is a regression, retain the prior baseline and file an issue with the affected state and environment details.
- Check accessibility independently. Use accessibility assertions or tools for semantics and accessible structure. A visual image comparison does not inspect the accessibility tree; Playwright’s ARIA snapshot assertions compare expected structure with that tree.
3. What to look for in UI changes
Layout and positioning
Check alignment, spacing, sizing, overlap, clipping, unexpected wrapping, and changes to nearby elements. A small shift in one component can alter the surrounding layout, so inspect enough of the page to see its context.
Content and interface state
Look for missing or changed labels, images, icons, buttons, and other content. Confirm that the checkpoint represents the state you meant to test. Loading, empty, and error states can each matter to a flow; a screenshot of only the default state will not cover them.
Visual styling and assets
Check color, typography, borders, shadows, and image assets. Before reporting a font or image difference as an application regression, confirm that the relevant asset loaded consistently in both captures.
Responsive behavior
Review the viewports and breakpoints that matter to the product. One screenshot at one viewport cannot establish that other layouts are correct. Treat each important viewport or responsive state as its own checkpoint with an appropriate baseline.
Capture noise
When an unexpected diff appears, first investigate whether the capture conditions changed. Dynamic content and environment differences can make two screenshots differ even if the application code did not change. Do not approve a baseline simply to clear a diff until you understand what changed.
Accessibility
Verify semantics and accessible structure using accessibility checks in addition to visual review. Chromatic distinguishes visual snapshots from accessibility data in its snapshot documentation; an image comparison cannot replace those checks.
4. Playwright example: capture and compare a checkpoint
Playwright Test can compare a page screenshot against a stored reference. The following test assumes your project is already configured to run Playwright Test and that the application is available at the example URL. Replace the URL and selectors with your own. The first run creates the reference image; review it before treating it as the accepted baseline.
import { test, expect } from '@playwright/test';
test('account page visual checkpoint', async ({ page }) => {
await page.setViewportSize({ width: 1280, height: 800 });
await page.goto('http://127.0.0.1:3000/account');
await page.getByRole('heading', { name: 'Account' }).waitFor();
await expect(page).toHaveScreenshot('account-page.png', {
fullPage: true,
animations: 'disabled',
});
});
Run the test with your project’s Playwright Test command, commonly:
npx playwright test
When an intentional UI change updates the expected rendering, review and update the reference using Playwright’s documented snapshot update workflow, commonly npx playwright test --update-snapshots. Review the resulting baseline changes as carefully as code changes. Avoid blindly updating every reference when a test fails; that can accept a regression as the new expected result.
Useful capture choices
fullPage: truecaptures the full page rather than only the viewport. Use it when below-the-fold content is part of the checkpoint; use a viewport capture when the state under review is specifically the visible region.animations: 'disabled'reduces changes caused by animations during capture. Make sure disabling animation does not hide a state you intend to test.- Set the viewport explicitly so the reference and new capture use the same dimensions.
- Use a locator screenshot assertion when only one component or region needs a baseline; use a page screenshot when the surrounding layout is part of the review.
Consult the Playwright screenshot assertion documentation for the current assertion options and snapshot update behavior.
5. Choose a workflow that fits the team
Start with how your team already runs UI tests, then compare how each option stores baselines, presents differences for review, handles rendering variation, and covers the browser environments and states you need. The official product documentation describes each vendor’s own workflow; those descriptions are not independent comparative testing.
| Option | What the documentation describes | Questions for your team |
|---|---|---|
| Playwright Test | Screenshot assertions and reference screenshot comparison within Playwright tests. | Does it fit your existing tests? Where will references live, and who reviews updates? |
| Chromatic | Visual snapshots compared with baselines, with documentation describing use of existing configuration, mocks, and tests. | How does its review flow fit your team? How will you keep capture setup consistent? |
| Applitools Eyes | A documented Playwright integration and a checkpoint review workflow. Its documentation describes Visual AI noise filtering; treat that as a vendor claim. | What comparison approach and baseline approval process do you need? How will reviewers verify that a difference is intentional? |
| ScreenshotNeo | A website screenshot API and MCP server for developers. It removes supported consent banners, newsletter popups, and chat widgets before capture; only clean shots are billed. | Would a screenshot API help when you need captures without managing browser setup? It returns page captures, while your visual test still needs a baseline and review decision. |
Keep the scope clear: a screenshot API can produce an image of a page, but visual regression testing still requires a deliberate checkpoint, an accepted baseline, a comparison, and a human or team decision about the diff.
6. Or skip the browser setup
If you need a page capture without setting up a browser runner, make a GET request to ScreenshotNeo. This example returns a WebP capture of the page; see the ScreenshotNeo API documentation for supported response formats and request options.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
ScreenshotNeo accepts cookie and consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response reports the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots.
Get 1,000 free screenshots a month with no card.
7. Troubleshooting visual diffs
| Symptom | Likely cause | What to do |
|---|---|---|
| Many unrelated pixels changed | The browser or operating environment changed, or assets rendered differently. | Compare browser version, OS, settings, hardware, power source, headless mode, viewport, fonts, and asset loading. Re-run in the stable environment before changing the baseline. |
| Text wraps differently | Viewport dimensions, font availability, or font loading differs. | Set the viewport explicitly and verify the same font assets loaded in both captures. |
| An element is missing | The capture may have occurred before the relevant state or content was ready. | Wait for a meaningful selector or state, and confirm the test exercised the intended interaction before capturing. |
| A diff appears only in headless runs | Headless mode is one of the documented sources of rendering variation. | Keep the mode consistent between baseline generation and comparison, then investigate other environment changes if the mismatch remains. |
| The comparison is noisy around animation | The page changed while the screenshot was being taken. | Disable animations where appropriate or wait for a stable state. Keep animation enabled if motion itself is what the test is meant to review. |
| A visual test passes but an accessibility issue remains | A screenshot checks appearance, not the accessibility tree. | Add or run accessibility assertions separately, such as checks against accessible structure. |
| A baseline update hides a real regression | References were refreshed without reviewing the changed UI. | Restore the prior baseline, inspect the diff, and require a reason for approving each intentional change. |
8. Performance, reliability, and cost considerations
Visual captures add browser work to the UI checks that produce them. Keep the suite useful by selecting representative states, avoiding duplicate checkpoints, and ensuring each test reaches the intended state before capture. A missing or unstable state can produce a misleading diff; repeatable browser and environment setup makes comparisons easier to interpret.
Baseline maintenance is part of the workflow: intentional design work creates reference updates that need review. There are no comparative speed, reliability, or cost benchmarks in the research for Playwright, Chromatic, or Applitools, so choose based on integration, baseline review, environment coverage, and the operating cost that applies to your own setup.
ScreenshotNeo has a free tier of 1,000 shots per month with no card. Paid plans are Starter $5 for 3,000, Growth $15 for 15,000, Pro $39 for 60,000, Scale $99 for 250,000, and Business $249 for 1,000,000; yearly billing gives two months free, and every feature is on every plan. These are API capture prices, not a claim about the total cost of a visual testing workflow. See ScreenshotNeo for the service.
9. Frequently asked questions
Does a screenshot diff prove a UI change is a bug?
No. It identifies a rendered difference. Review whether the change was intended and whether capture conditions were consistent before deciding.
Can one screenshot cover responsive behavior?
No. A screenshot records one viewport and state. Add checkpoints for the responsive layouts that matter.
Does a matching visual snapshot mean the page is accessible?
No. Check accessible semantics and structure separately with accessibility assertions or tools.
Should every changed baseline be approved?
Only after review confirms that the new rendering is intentional. Otherwise preserve the known-good reference and report the regression.


