October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsWindows FixRecommendedWindows errors stealing your time? Find the fix fastScan stability, cleanup and performance issues.Fix NowOctober 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 Set Up Argos CI with Playwright for Visual Regression Testing

A practical guide to connecting Argos CI and Playwright, capturing stable screenshots, and reviewing visual changes from CI.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

To set up Argos CI with Playwright, connect your repository to Argos, install its Playwright integration, register the Argos reporter in playwright.config.ts, and call argosScreenshot(page, "name") in tests. In CI, install the Playwright browser, provide the Argos token as a secret, and run playwright test. Argos then uploads screenshots for hosted comparison and pull-request review.

What the integration does

Playwright runs the browser tests and captures the application states you choose. The Argos reporter sends those captures to Argos for visual comparison and review. This keeps the browser test and screenshot capture in your Playwright suite while moving screenshot storage and review into Argos.

As an Amazon Associate I earn from qualifying purchases.

Argos’s setup guides describe a GitHub pull-request workflow. You connect the repository through Argos’s GitHub App, grant it access, and review visual changes in Argos. Follow the current onboarding flow and package instructions in the Argos documentation; package details in older tutorials may be version-specific. The vendor walkthrough is also available in Argos’s GitHub Actions tutorial.

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

Connect the repository and install the packages

  1. Connect the repository. Sign in to Argos, install its GitHub App, and grant access to the repository you want to test. Complete the current project onboarding so Argos can associate screenshot uploads with pull requests.
  2. Install the integration and CLI. The Argos Playwright tutorial uses @argos-ci/playwright and @argos-ci/cli. Use the installation commands and compatible versions shown in the current Argos guide rather than assuming an older tutorial’s versions are still current.
  3. Obtain the Argos token. Configure the token following the project’s current Argos instructions. Keep it out of source control; add it to the CI provider’s encrypted secrets.

Register Argos in Playwright

Add the Argos reporter to your Playwright configuration. The guides show enabling the Argos reporter in CI while keeping a local Playwright reporter for ordinary local runs. Adapt this configuration to your existing reporters and the current integration package instructions:

import { defineConfig } from "@playwright/test";

export default defineConfig({
  reporter: process.env.CI
    ? ["@argos-ci/playwright/reporter"]
    : [["list"]],
});

This example selects the Argos reporter in CI and Playwright’s list reporter otherwise. If your project needs multiple reporters in CI, preserve them as entries in the reporter array. Check the Argos guide for the reporter syntax supported by the version you install.

Capture meaningful page states in tests

Import argosScreenshot from the integration package in your Playwright test, navigate to the state you want reviewed, and give the capture a stable, descriptive name. For example:

import { test } from "@playwright/test";
import { argosScreenshot } from "@argos-ci/playwright";

test("pricing page visual state", async ({ page }) => {
  await page.goto("http://localhost:3000/pricing");
  await argosScreenshot(page, "pricing-page");
});

Use names that identify the route or state rather than transient test details. Capture after the page reaches the state whose appearance matters—for example, after opening a menu or applying a filter if that interaction is part of the intended visual check. The current Argos guide says its helper waits for fonts, images, and network activity to settle and handles instability such as carets and scrollbars. Those measures help, but they do not replace a consistent browser and operating-system environment.

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

Run the tests in GitHub Actions

The basic CI sequence is checkout, set up Node, install project dependencies, install Playwright browsers, then run the tests. Store the Argos token as an encrypted repository or organization secret and expose it to the test step using the variable name specified by your Argos project setup.

name: Visual tests

on:
  pull_request:

jobs:
  playwright:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: 22
          cache: npm
      - run: npm ci
      - run: npx playwright install --with-deps
      - run: npx playwright test
        env:
          ARGOS_TOKEN: ${{ secrets.ARGOS_TOKEN }}

This is an illustrative workflow sequence, not a claim about required Node or action versions. Match Node, Playwright, and action versions to your project; use the exact Argos token variable specified in its current instructions. The relevant vendor example is Argos’s GitHub Actions tutorial. With the reporter configured and credentials present, the CI run uploads captures as the tests execute.

Keep screenshots stable across CI runs

Visual comparisons are meaningful only when the rendering environment is sufficiently consistent. Browser version, operating system, installed fonts, and rendering differences can change pixels even when application code has not changed.

Rank #4
The Web Testing Handbook
  • Used Book in Good Condition

Pin the Playwright container

Argos recommends using the official Playwright Docker image pinned to the Playwright version used by the project. This gives CI a controlled browser and dependency environment. Keep the image version aligned with the Playwright package version and update them together; otherwise browser/package mismatches can undermine reproducibility.

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

Cache browsers when useful

Argos’s CI performance guide demonstrates caching Playwright browser binaries with a cache key based on operating system and Playwright version, and installing browser dependencies when needed. Browser caching can reduce repeated setup work, but it is an optimization rather than a requirement for the integration. See Argos’s Playwright speed guide.

Reduce application-level variation

  • Capture the same routes, viewport conditions, and application state on each run.
  • Wait for meaningful content to load before capturing; avoid baselines taken during animations or transient loading states.
  • Use stable test data and avoid content that changes unpredictably between runs where practical.
  • When screenshots differ, first check browser, operating system, fonts, and page state before assuming the application change caused the difference.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Choose between Argos and Playwright’s built-in snapshots

Playwright’s toHaveScreenshot() assertions store reference images in the repository and compare later captures against them. That can suit a smaller project that wants baselines versioned in Git. Argos instead offers hosted screenshot storage, comparison, and review, including a workflow oriented around pull requests. The choice depends on baseline ownership, how reviewers should inspect changes, and how much service configuration your team wants to maintain. Argos discusses the trade-offs in its Playwright visual regression guide.

Troubleshoot common setup failures

  • No Argos review or uploads appear: verify the GitHub App has access to the repository, the Argos reporter is selected for the CI run, and the token is available to that job under the variable name required by your Argos configuration.
  • The reporter cannot be resolved: check that the integration package is installed in the workspace running Playwright and that the reporter path matches the installed package’s current documentation. In monorepos, install or reference it from the correct package context.
  • Browser launch fails in CI: ensure the workflow installs Playwright browsers and required dependencies, or use the official Playwright container aligned to the project’s Playwright version.
  • Screenshots change without an obvious UI change: compare the OS, browser version, fonts, viewport, and test data between runs. A rendering-environment change can create pixel differences independently of application code.
  • Captures show incomplete or transient content: wait for the relevant UI state before calling the screenshot helper, and confirm the route and data are ready. The helper’s settling behavior does not guarantee every application-specific async state is finished.

Or skip the browser setup:

If your goal is a screenshot from a URL rather than a Playwright-driven visual regression suite, ScreenshotNeo can return a screenshot or PDF from one GET request. It accepts cookie or consent banners like a visitor and removes 60+ known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. An MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents.

For example, request a WebP screenshot with cURL (replace the target URL and use your API key):

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -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 the request options. The free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots. Sign up for ScreenshotNeo’s free plan.

Frequently Asked Questions

Does Argos replace Playwright?

No. Playwright still runs the browser tests and captures the states; Argos handles hosted screenshot comparison and review.

Can I use Argos with a CI provider other than GitHub Actions?

The core setup is a Playwright reporter and a CI job that runs the tests with the Argos token available. The cited walkthrough shows GitHub Actions; consult Argos’s current documentation for provider-specific instructions.

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.

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

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
Windows Errors? Fix Them Before They SpreadFree repair scan
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.