Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesTo add visual regression checks to an existing React project, install Percy’s Playwright helper and CLI, call percySnapshot in selected Playwright tests after the page reaches the state you want to inspect, then run the test command through percy exec. Playwright continues to test behavior; Percy captures and compares the rendered appearance.
How Percy and Playwright fit into a React project
Playwright Test runs browser tests and gives each test a page to navigate and interact with. Percy adds hosted visual snapshot capture and comparison for the states you choose to submit. React does not need a Percy-specific React SDK for this browser-test workflow: the snapshot helper receives the Playwright page.
As an Amazon Associate I earn from qualifying purchases.
Keep the two kinds of checks distinct. Playwright assertions check outcomes such as whether a button works or the expected content appears. Percy comparisons show how a captured state looks relative to its approved baseline. A visual difference is evidence to review, not a substitute for behavioral assertions.
1. Confirm Playwright Test is working
In an existing React application, preserve its app and test structure; do not scaffold a second application just to add Percy. If Playwright Test is not installed, its official installation guide describes npm init playwright@latest as a way to initialize a project or add Playwright to an existing one. That setup can add configuration and starter tests and install the required browsers.
#1 Best Overall
Run the suite with npx playwright test and address any existing test or browser-setup failures first. Percy will wrap this command later; it does not replace the Playwright test runner.
2. Install Percy’s packages
The Percy vendor guide gives this development-dependency command:
npm install --save-dev @percy/cli @percy/playwright
The CLI wraps the test process, while @percy/playwright provides the helper used to request snapshots from a Playwright test. The setup example is from a vendor blog, not a versioned API reference; check Percy’s current package documentation if exact package versions or API compatibility are critical to your rollout.
3. Add snapshots to meaningful page states
Import percySnapshot and call it with the Playwright page after navigation and any actions needed to reach the state under review. For example:
Rank #2
- HTML CSS Design and Build Web Sites
- Comes with secure packaging
- It can be a gift option
import { percySnapshot } from '@percy/playwright';
Inside a Playwright test, a snapshot can follow navigation like this:
await page.goto('/login');
await percySnapshot(page, 'Login – Initial State');
For an interaction-specific view, perform the interaction and its behavioral assertions first, then capture the resulting state:
await page.goto('/login');
await page.getByLabel('Email').fill('not-an-email');
await page.getByRole('button', { name: 'Sign in' }).click();
await expect(page.getByText('Enter a valid email address')).toBeVisible();
await percySnapshot(page, 'Login – Invalid Email');
The form labels, button name, and validation message above are illustrative: replace them with selectors and expected text from your application. The important sequence is to reach the intended user-visible state before capturing it. Use descriptive snapshot names so a reviewer can identify the page and condition.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteChoose states that are worth comparing
- Capture a representative initial page state when its layout matters.
- Capture post-interaction states when a user action changes the visible interface.
- Capture an asynchronous or lazy-loaded state only after the relevant content is ready.
Wait for the actual readiness condition in your app, such as a particular element becoming visible or the expected content appearing. Percy’s vendor setup guidance recommends allowing network work, animations, and lazy-loaded content to settle, and reducing dynamic content that creates noisy diffs. A generic delay or network-idle condition is not automatically right for every application; base the wait on what the test needs to see.
Rank #3
4. Run Playwright through Percy
Use Percy CLI’s exec wrapper around the command you already use to run Playwright Test:
npx percy exec -- npx playwright test
Percy needs the project token to authenticate snapshot uploads. Make it available to the wrapped process using the current instructions for your Percy project, and keep the secret out of source control. The documented setup example establishes the wrapper pattern but does not establish current account-screen labels or a specific token-management workflow, so use Percy’s current project guidance for those details.
Make the command easy to reuse
If your project has an existing test script, keep that script as the command Percy wraps. For example, a package script could be invoked as:
Recommended Free Tools
npx percy exec -- npm test
Use this form only if npm test in your project actually runs Playwright Test. The wrapper should enclose the existing test command, not a different runner or a command that skips the tests containing your snapshots.
Rank #4
- Brand: Wiley
- Set of 2 Volumes
- A handy two-book set that uniquely combines related technologies Highly visual format and accessible language makes these books highly effective learning tools Perfect for beginning web designers and front-end developers
5. Review diffs and update baselines deliberately
When a comparison reports a difference, inspect the changed appearance and decide whether it reflects an intended design change or a regression. Fix unintended changes in the application; approve a new baseline only when the changed appearance is expected. Keep functional assertions in the tests regardless of whether Percy reports a visual difference.
- Behavioral failure: investigate the failed Playwright assertion or interaction.
- Visual difference: inspect the rendered change and accept or reject it based on the intended design.
- Both: resolve the behavior and appearance independently; passing one check does not imply the other is correct.
Common setup problems and fixes
The Percy helper cannot be imported
Confirm that @percy/playwright is installed in the project where the tests run and that the import is spelled import { percySnapshot } from '@percy/playwright';. If package versions or export behavior are in question, verify them against the current package documentation rather than assuming an unverified version.
No Percy snapshots are uploaded
Check that the test containing percySnapshot is actually part of the command wrapped by npx percy exec --, and that the Percy project token is available to that process. Do not commit the token as a way to make it available.
The captured state is incomplete or inconsistent
Move the snapshot call until after navigation, required interactions, and the app-specific readiness condition. Check for unfinished network-driven content, animations, lazy-loaded elements, or changing data that can make captures unstable.
Best Value
Every run produces noisy differences
Look for content that changes independently of the layout you intend to verify, and avoid capturing before asynchronous content settles. Reduce dynamic content where practical and capture a deliberate, stable state rather than adding a blanket wait that may not match the page’s actual readiness.
Visual checks pass but an interaction is broken
A screenshot comparison checks appearance, not whether the interface behaves correctly. Add or retain Playwright assertions for the user-visible outcomes and interactions that matter.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Performance, reliability, and cost considerations
Capture only states that provide useful visual coverage: each snapshot adds a state reviewers may need to inspect, while excessive dynamic or redundant captures can make changes harder to interpret. Waiting for real readiness conditions improves consistency without relying on arbitrary delays. Percy’s hosted comparison and upload costs or limits are not established by the setup details here; consult current Percy plan information for those figures.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Or skip the browser setup
If your goal is a screenshot rather than a Percy visual-regression workflow, ScreenshotNeo takes a URL in one API request and returns an image or PDF. It is not a replacement for Playwright assertions or Percy’s baseline comparison. Its API removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed, and responses report the page verdict and billing status. An MCP server provides screenshot tools for AI agents.
Example request using cURL (replace the URL with a page you can access):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://your-preview.example.com -o shot.webp
See the ScreenshotNeo API documentation for the request details. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




