October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

How to Run Visual Tests in Playwright With Applitools

Add Applitools Eyes to a Playwright suite with the fixture SDK, protect its API key, choose meaningful checkpoints, and review differences before accepting new baselines.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To add visual regression tests to a Playwright suite, install Applitools Eyes, set APPLITOOLS_API_KEY in your environment, import Applitools’ Playwright fixture, and call eyes.check() after the page reaches a stable, meaningful state. Eyes compares each checkpoint with a saved baseline; review reported differences and accept only changes that are intentional.

The example below uses the JavaScript/TypeScript Fixtures SDK. Applitools also lists Standard, Java, C#, and Python variants, but their setup and imports are not interchangeable. Choose the instructions for your language in Applitools’ SDK directory.

As an Amazon Associate I earn from qualifying purchases.

Install Eyes and configure the API key

Applitools’ current onboarding article describes installing @applitools/eyes-playwright and running npx eyes-playwright setup. The setup command can add configuration and an example visual test. Package interfaces can change, so check the live Playwright integration guide and the version installed in your project before copying commands.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  1. From your Playwright project, install the package: npm install --save-dev @applitools/eyes-playwright.

  2. Run the setup command: npx eyes-playwright setup.

  3. Retrieve an execution key from the Applitools dashboard and provide it as APPLITOOLS_API_KEY. Set it in your local environment or your CI provider’s protected secret store. Applitools recommends an environment variable rather than hardcoding the key in project configuration; do not commit a real key to source control. See Applitools’ dashboard documentation.

The setup command may generate an example or configuration for your installed SDK. Treat that output and the current integration guide as authoritative if they differ from older snippets.

Add a checkpoint with the Eyes fixture

Import the enhanced test from @applitools/eyes-playwright/fixture. The fixture makes eyes available in the test and manages the Eyes lifecycle and result collection.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { test, expect } from '@playwright/test';
import { test as eyesTest } from '@applitools/eyes-playwright/fixture';

eyesTest('homepage visual check', async ({ page, eyes }) => {
  await page.goto('https://example.com');
  await expect(page.getByRole('heading', { name: 'Example Domain' })).toBeVisible();

  await eyes.check('Homepage', {
    fully: true,
    matchLevel: 'Strict',
  });
});

The example uses an ordinary Playwright assertion to establish a functional condition, then captures the visual state. In your suite, use the Eyes-enhanced fixture as the test entry point for tests that need the eyes fixture; follow the generated setup and current SDK guide if you need to combine or customize fixtures.

A visual checkpoint answers whether the rendered interface differs from its baseline according to the configured matching rules. It does not prove that links work, data is correct, or every interaction behaves correctly. Keep functional assertions for those behaviors.

Choose what to capture and how to compare it

Full page or a specific element

Use fully: true when the question is whether the overall page composition changed. For a component-level check, pass a locator as the region, as in this example:

await eyes.check('Primary navigation', {
  region: page.getByRole('navigation'),
  matchLevel: 'Layout',
});

Full-page checks can reveal changes in page-wide layout; a region check isolates a component and can make results easier to interpret. Applitools’ guide demonstrates both full-page capture and locator-based regions.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Match level

The integration guide describes multiple match levels and recommends Strict in its example guidance. It also uses Layout for a component region. Select a level based on what matters for that checkpoint: whether appearance details or broader arrangement should trigger a difference. Validate the choice against your own interface and the current SDK documentation; do not assume that one setting is right for every page.

Handle dynamic areas narrowly

If a timestamp, rotating promotion, avatar, or other variable content makes a checkpoint noisy, use ignoreRegions to exclude only that known area. The guide also documents floating regions and displacement handling for cases where those controls fit the UI. Broad exclusions can conceal a real regression, so keep them limited to content that is expected to vary and is not part of the visual behavior you want to protect.

Wait for a stable user-visible state

Drive the application to the state you intend to test before capturing it. Use normal Playwright actions and assertions to establish that state rather than placing a screenshot immediately after navigation. Give each checkpoint a name that identifies the page or component and, where useful, its state. Applitools’ documentation says: “Provide meaningful names to your eyes.check() calls for easy identification in the Applitools Dashboard.” See the integration guide.

Review differences and update baselines deliberately

Eyes sends checkpoints to the Eyes Server, where new images are compared with saved baselines and differences are reported. A changed image is a finding to review, not an automatic instruction to replace the baseline. Inspect the enhanced report or dashboard, determine whether the change is intended, and accept or reject it. Accepting an intended product change updates the baseline used by future comparisons; rejecting an unintended change leaves it as a failure. Baseline mutation requires authentication. See Applitools’ visual UI testing overview and the Playwright instructions.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Decide when differences fail tests

The integration guide documents eyesConfig.failTestsOnDiff values of afterEach, afterAll, or false. This is a project policy choice: surface differences after each test, after a batch, or allow review without immediate test failure. Confirm the exact behavior against the current SDK documentation and your installed package version before changing this setting.

Use reports and page objects where they help

The custom reporter can add Eyes results to Playwright’s HTML report. The guide says results may be reviewed without signing in to the dashboard, but accepting or rejecting baseline changes requires authentication. For larger suites, the guide also demonstrates passing Eyes into a page object and putting the checkpoint in a page-level method. That can organize repeated checks; a small suite may be clearer with the call directly in the test.

What the integration does—and does not—promise

The documented flow is: Playwright drives the application, the Eyes SDK captures and sends checkpoints, the Eyes Server compares them with stored baselines, and a person reviews differences and updates a baseline when a change is intended. Applitools documents public cloud, dedicated cloud, and on-premises server configurations in its system overview. Data handling and deployment depend on the configuration you select; the integration alone is not a data-residency or security guarantee.

Applitools positions Visual AI as a way to reduce noise from rendering differences such as anti-aliasing and font rendering. That is a vendor claim, not a guarantee that pixel-level or cross-environment differences disappear. The appropriate comparison behavior depends on your app and test environments; no measured false-positive rate or speed improvement is established by the cited material. See Applitools’ support page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common setup and review problems

  • The test cannot find eyes in its arguments. Confirm that the test imports the Applitools fixture from @applitools/eyes-playwright/fixture and uses the fixture-enhanced test function. A plain Playwright test does not expose the Eyes fixture.

  • Authentication fails or the key is missing. Check that APPLITOOLS_API_KEY is present in the process running Playwright. In CI, confirm the protected secret is available to that job and is not being masked or omitted by its environment configuration. Do not solve this by committing the key.

  • A checkpoint differs on every run. First verify that the same application state is reached before capture. Then identify the specific changing content and use a narrow ignore region only if that content is irrelevant to the test. Avoid masking an entire component to silence a failure.

  • A reported change is not visible in Playwright’s usual output. Review the Eyes result in its enhanced report or dashboard. If you use the custom reporter, confirm it is configured according to the current integration guide.

    Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • You cannot accept or reject a baseline change. Review access to the dashboard and authenticate; the integration instructions state that baseline acceptance or rejection requires authentication.

  • An older example does not match your installed SDK. Check the version in your project and use the current vendor guide for that version. The March 11, 2026 Applitools onboarding article describes the package and setup command, but package interfaces can change.

Or skip the browser setup

If you need a screenshot file or PDF from a URL rather than baseline-based visual regression testing, ScreenshotNeo is a separate website screenshot API and MCP server. It does not replace Eyes checkpoints or baseline review. Its one-request API can return an image or PDF:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp

See the ScreenshotNeo API documentation for request options. Before a capture, it can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
Windows Errors? Fix Them Before They SpreadFree repair scan

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.