Recommended Free Tools
To run Playwright screenshot tests in GitHub Actions, install your project dependencies from its lockfile, install Playwright’s browsers and Linux system dependencies, then run npx playwright test. For reliable visual comparisons, create and check screenshot baselines in the same operating system and browser environment used by CI.
Set up the GitHub Actions workflow
This npm example runs Playwright tests on pushes and pull requests to main, installs browsers and Linux dependencies, and uploads the HTML report after the job finishes. It assumes your project has a Playwright Test setup and a reporter that writes to playwright-report/.
name: Playwright Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with:
node-version: lts/*
- run: npm ci
- run: npx playwright install --with-deps
- run: npx playwright test
- uses: actions/upload-artifact@v5
if: ${{ !cancelled() }}
with:
name: playwright-report
path: playwright-report/
retention-days: 30
The action tags and retention value above match the example in Playwright’s CI documentation and may change; check the live documentation before adopting version-specific values. The essential sequence is to install locked project dependencies, install the browsers and operating-system dependencies, and then run the tests.
Use the project’s package manager
For npm, npm ci uses the lockfile and fails rather than silently rewriting it. For pnpm, Yarn, or another package manager, use its lockfile-respecting install command and the project’s intended Playwright invocation. Keep the workflow, package scripts, and configuration aligned; the npm commands are not universal.
Outdated 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 matchWindows 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 reinstall#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.
Configure screenshot assertions
Use Playwright Test’s await expect(page).toHaveScreenshot() to compare a rendered page with a reference image. A first run can create a baseline if one does not exist. Inspect the generated image, then commit the approved snapshot alongside the test. Playwright documents the visual comparison and baseline workflow.
import { test, expect } from '@playwright/test';
test('homepage visual baseline', async ({ page }) => {
await page.goto('https://example.com');
await expect(page).toHaveScreenshot();
});
When a visual change is intentional, regenerate snapshots with npx playwright test --update-snapshots, review the image diff, and commit only the expected changes. Avoid increasing comparison thresholds casually: excessive tolerance can mask a real regression.
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.
Playwright also supports capturing full pages, elements, files, or buffers through its screenshot API; choose the scope that matches the regression you need to catch. See Playwright’s screenshot documentation.
Keep visual baselines consistent
A screenshot baseline is meaningful only relative to its rendering environment. Playwright warns that rendering may vary with host operating system, browser version and settings, hardware, power source, headless mode, and other factors. Fonts are another practical source of pixel differences. Create baselines in the same environment CI uses, and avoid generating them on one operating system only to compare them on another.
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.
Choose a runner or container
A GitHub-hosted runner with direct browser installation is straightforward. A Playwright container can make the operating-system environment more controlled, which is useful for visual testing across machines. If you use a container, align its Playwright release and browser version with the Playwright package installed by the project. Container tags and releases change, so use the current example in the official CI guide rather than pinning an unverified tag.
Reinstall browsers after Playwright upgrades
Playwright browser binaries are tied to the installed Playwright version. After upgrading the package, run the browser installation command again. npx playwright install --with-deps installs browsers and Linux dependencies; a targeted browser install is available when the project does not need every browser. See Playwright browser installation guidance.
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
Balance stability and CI speed
Start with one worker
Playwright recommends setting workers to 1 in CI to prioritize stability and reproducibility. Set this in your Playwright configuration if parallel execution makes screenshot results or failures harder to diagnose. For larger suites, sharding across multiple jobs can reduce elapsed time, at the cost of extra workflow and report-handling complexity. The CI guide covers both approaches.
Be deliberate about browser caching
Playwright’s CI guidance generally does not recommend caching browser binaries: restoring a cache may take about as long as downloading them, and Linux system dependencies cannot be cached that way. If you do cache browser files, key the cache to the Playwright version so an upgrade does not reuse incompatible binaries.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →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.
Use reports, annotations, and traces for different jobs
- HTML report: an artifact you can open after the workflow run to inspect test outcomes.
- GitHub annotations: failure information surfaced in the Actions or pull request interface. Playwright cautions that matrix jobs can multiply annotations and clutter the file view; see test reporter guidance.
- Trace: a detailed record for diagnosing a failure, including action history, logs, DOM snapshots, network information, and screenshots. See the Trace Viewer documentation.
Configure tracing on retry in CI rather than recording every test by default; Playwright’s best-practices guide notes that tracing every test has a performance cost. Retain traces for failed or retried tests so you can investigate without rerunning the same workflow blindly.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common failures
| Symptom | Likely cause | What to do |
|---|---|---|
| Browser executable is missing | The browser for the installed Playwright version was not installed, or Playwright was upgraded after installation. | Run npx playwright install --with-deps in the workflow after installing dependencies. |
| Linux dependency or shared-library error | Required operating-system packages are absent on the runner. | Use npx playwright install --with-deps or the documented dependency-install approach for the selected browser. |
| Screenshot differs only in CI | The baseline and CI differ in OS, browser, fonts, headless mode, hardware, or other rendering conditions. | Generate and compare snapshots in a consistent environment; inspect the actual diff before changing thresholds. |
| Snapshot is missing or newly generated | No committed baseline exists for the test and environment. | Run the test in the intended baseline environment, inspect the generated image, then commit the approved snapshot. |
| Many noisy failures or flaky screenshot comparisons | Parallel workers, unstable page state, or uncontrolled rendering conditions may make runs inconsistent. | Begin with one worker, wait for the page state relevant to the assertion, and inspect a retained trace to find timing or rendering differences. |
| Report artifact is empty or absent | The reporter may not be configured to write the expected directory, or the job may not reach the upload step. | Align Playwright reporter configuration with playwright-report/ and review the workflow outcome. The upload step shown above runs unless the job is cancelled. |
Or skip the browser setup
If you need screenshots from a website rather than visual regression assertions inside Playwright, ScreenshotNeo offers a one-request screenshot API. It accepts a URL and can return PNG, JPEG, WebP, or PDF. This does not replace Playwright’s committed baselines or toHaveScreenshot() assertions.
cURL example, with the target URL adapted to the page you want to capture:
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 request options. Cookie banners are accepted like a visitor and more than 60 known consent platforms, newsletter popups, and chat widgets can be removed 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 the response identifies the page verdict and billing status in headers. An 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. Sign up for free ScreenshotNeo access.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Frequently Asked Questions
Does Playwright create a screenshot baseline automatically?
A first visual assertion run can generate a baseline when none exists. Inspect and commit the intended image before relying on it in CI.
Should GitHub Actions cache Playwright browsers?
Playwright generally advises against it because cache restoration can take as long as downloading, and Linux system dependencies cannot be cached. If you do cache browser binaries, key the cache to the Playwright version.
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.

