To automate visual testing with Percy, add its SDK for your test framework, capture snapshots after the UI reaches meaningful states, set your Percy project token in the run environment, and wrap your existing test command with percy exec. Percy then creates a build for visual comparison; review the diffs and approve only changes that are intentional.
How Percy visual testing fits into an existing test suite
Percy adds visual snapshots to functional tests rather than replacing them. Your tests still navigate the application and check behavior; Percy’s SDK captures named UI states, and the Percy CLI runs alongside the test process to collect and submit those snapshots for comparison. The resulting diffs need human review: a detected change may be a defect or an intentional design update.
Percy’s integrations cover web applications, native apps, static sites, styleguides, component libraries, CI/CD and code-review workflows. Start at Percy’s integrations page to verify support for your app type, framework and workflow before choosing an SDK.
Set up Percy with Playwright
1. Install the CLI and SDK
For a JavaScript or TypeScript project using Playwright, install Percy’s packages as development dependencies:
Windows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallOutdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware match#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
npm install --save-dev @percy/cli @percy/playwright
The official Playwright SDK repository documents the package and snapshot API. Check it during implementation for current package instructions.
2. Add snapshots at deliberate UI states
Import percySnapshot from @percy/playwright in the test file, then call it with the Playwright page and a descriptive name after navigation and any relevant interactions or asynchronous rendering have finished:
import { test, expect } from '@playwright/test';
import { percySnapshot } from '@percy/playwright';
test('home page visual state', async ({ page }) => {
await page.goto('https://example.com');
await expect(page.getByRole('heading', { name: 'Welcome' })).toBeVisible();
await percySnapshot(page, 'Home page');
});
Replace the example URL and heading with elements from your application. The assertion illustrates waiting for an application-specific condition; choose a condition that signals the state you actually intend to capture. Snapshot names should be stable and descriptive so reviewers can identify corresponding states between builds.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
3. Make the project token available and run the suite
Create or select the Percy project, then provide its token to the process that runs Percy. Keep it in an environment variable or CI secret, not in a committed test file:
export PERCY_TOKEN=your_project_token
npx percy exec -- npx playwright test
The standard command shape is npx percy exec -- npx playwright test. The CLI wraps the test process, receives snapshots from the SDK, and finalizes a Percy build. The repository’s examples and details are at percy-playwright.
Set up Percy with Cypress
1. Install the packages
npm install --save-dev @percy/cli @percy/cypress
See the official Cypress SDK repository for its current package and setup instructions.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
2. Load the SDK and place snapshot calls
Import @percy/cypress in the Cypress support file used by your project. Add cy.percySnapshot() calls in tests after navigation or interaction has reached the intended visible state. For example:
cy.visit('https://example.com');
cy.findByRole('heading', { name: 'Welcome' }).should('be.visible');
cy.percySnapshot('Home page');
Adapt the visit, assertion and snapshot name to your application and installed Cypress commands. Percy’s Cypress visual testing guide describes this flow.
Free tools Windows power users keep installed
One-click scans. No signup required.
3. Run Cypress through Percy
Set PERCY_TOKEN in the shell or CI environment, then run:
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
export PERCY_TOKEN=your_project_token
npx percy exec -- cypress run
Without an active Percy process and token, the SDK examples do not submit snapshots as a Percy build. Keep the token out of source control.
Run Percy in CI and review the baseline
Use the same wrapped command in CI that you use locally, with the project token supplied through the CI provider’s secret or environment-variable settings. Percy describes CI/CD and pull- or merge-request workflows, as well as Slack notifications and webhooks; choose the review and notification route that fits the team’s existing process. Confirm current integration details at Percy integrations.
- Establish a reference. The first run needs an approved baseline against which later snapshots can be compared.
- Inspect each visual diff. Decide whether the change is an expected UI update or a regression; a diff alone does not establish that something is broken.
- Approve intentional updates. Approve the changed appearance when it reflects the intended design. If it does not, fix the UI and rerun the tests rather than accepting the changed baseline.
Make snapshots reliable and useful
- Capture stable states. Place the snapshot after page navigation, relevant user actions and the asynchronous rendering needed for the screen under test. An arbitrary capture during rendering can produce a misleading comparison.
- Name states consistently. Use a stable page- or state-oriented name, such as “Checkout — payment details,” so reviewers can recognize the same state across runs.
- Keep behavior assertions. A visual snapshot does not replace functional assertions. Check that the intended state has been reached before capturing it.
- Review rather than blindly accept. Treat the approved baseline as the team’s reviewed expectation, not as an automatic record of every new appearance.
- Recheck compatibility. SDK support and package instructions can change; verify them against the official integration page and the relevant SDK repository when setting up.
Troubleshooting common setup problems
No Percy build or snapshots appear
Check that the test command is being run inside percy exec, that the matching SDK is installed and imported, and that PERCY_TOKEN is available to that process. A test run outside Percy’s active process does not submit snapshots as a Percy build according to the SDK examples.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
A snapshot captures an incomplete or inconsistent screen
Move the snapshot call until after navigation, required interaction and application-specific rendering are complete. Add or retain an assertion for the target state, then capture it. Avoid relying on an arbitrary point in the test where loading may still be in progress.
Reviewers cannot identify snapshots between builds
Replace vague or changing snapshot labels with stable names that identify the page and state. Keep naming consistent for equivalent states in repeated runs.
A diff appears after a legitimate redesign
Review the changed appearance in Percy. If it matches the intended design, approve it as the new baseline; otherwise correct the UI and run the suite again. Do not approve a diff merely to clear it.
Or skip the browser setup
For a one-call screenshot rather than Percy’s in-test visual comparison workflow, ScreenshotNeo is a website screenshot API and MCP server for developers. It accepts a URL and returns a screenshot or PDF; it is not a replacement for Percy’s baseline review. Its one-call API can be useful when you need an image capture without setting up a browser harness:
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Repair Windows errors before they cause bigger problems3Scan for outdated or missing drivers - takes under a minutecurl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for parameters. ScreenshotNeo accepts cookie or consent banners as a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and responses identify the page verdict and billing status in headers. An MCP server exposes take_screenshot, get_page_info and capture_pdf 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.
Sign up for ScreenshotNeo’s free plan.
Sources
Percy integration and SDK details cited above were accessed on October 3, 2026. Package support and instructions may change; check the linked official pages when implementing.
Quick Recap
- Percy integrations
- Percy Playwright SDK
- Percy Cypress SDK
- Conducting Visual Testing With Cypress
- Percy
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.

