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.

Make the page’s data and rendered state deterministic before taking a screenshot. Stub only the requests that define the visual state, wait for the response when useful, then assert that the expected UI is visible before capturing. A request finishing is not, by itself, proof that the interface has finished updating. Keep separate integration tests for behavior that must be verified against a real service.

Why network requests make visual tests flaky

A screenshot records the page at the instant it is captured. If an API response varies between runs, or arrives after the snapshot, the page can show different content even when the frontend code has not changed. Cypress’s visual-testing guidance puts it plainly: “Real API responses change over time, which makes screenshots change too.” Cypress Documentation: Visual testing in Cypress

The fix is not simply to wait longer. Make the data for the visual state predictable, and make the capture depend on an observable condition in the interface.

A reliable sequence for stabilizing a visual test

  1. Identify the relevant requests. Find which API calls supply the component or page content being compared. Intercept those calls rather than indiscriminately stubbing unrelated traffic.
  2. Return stable data. Use a fixture or explicit mock response that represents the state this test is meant to render. Keep the fixture stable across runs.
  3. Reach the state under test. Use the normal user action or setup needed to display it. Wait for a named request if that helps coordinate the test.
  4. Assert the UI state. Check that the expected content or state is actually visible. The response can complete before application code has processed it and updated the DOM.
  5. Capture after the assertion. Take the snapshot only once the intended state is present. Avoid relying on a fixed sleep, generic timeout, or “network idle” as the sole readiness signal.
  6. Stabilize rendering conditions. Keep the browser, operating system, viewport, and fonts consistent where practical. Disable or settle animations, and mask only small regions that remain inherently uncontrolled.

Cypress: intercept a request, wait, then assert

Cypress documents using cy.intercept() with fixture data, waiting for the aliased request, and checking the page state before taking a snapshot. Adapt the fixture path, selector, and snapshot command to the project’s setup:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • 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.
cy.intercept('GET', '/api/items', { fixture: 'items.json' }).as('getItems');

cy.visit('/items');
cy.wait('@getItems');
cy.get('[data-testid="items-list"]').should('be.visible');
cy.get('[data-testid="items-list"]').should('contain', 'Fixture item');

// Call the visual snapshot command used by your project here.

The request wait coordinates with the network; the assertions establish that the UI has reached the state worth comparing. Use an assertion that reflects the tested state rather than merely checking that some container exists.

Cypress also notes that action-command animation options do not prevent an unrelated animation elsewhere on the page from appearing mid-frame in a snapshot. Make animation behavior predictable at the application or test level when needed; do not assume an action’s animation setting freezes the whole page. Cypress visual testing guidance

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 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: route requests and mock responses

Playwright supports request routing and mocking through browserContext.route() and page.route(). This example installs a route before navigation so the page receives a stable response:

import { test, expect } from '@playwright/test';

test('renders the items state consistently', async ({ page }) => {
  await page.route('**/api/items', async route => {
    await route.fulfill({
      status: 200,
      contentType: 'application/json',
      body: JSON.stringify([{ id: '1', name: 'Fixture item' }]),
    });
  });

  await page.goto('/items');
  await expect(page.getByTestId('items-list')).toContainText('Fixture item');

  // Call the visual snapshot assertion used by your project here.
});

If native routing or network events appear to miss requests, check whether Service Workers are handling them. Playwright’s documentation recommends blocking Service Workers when native routing needs to observe and handle those requests. Consider setting serviceWorkers: 'block' in the relevant test context or project configuration, then confirm that the request is intercepted as expected. Playwright: Network

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • 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 mocks, seeded data, or live services based on the test question

Approach Best suited to Trade-off
Fixture or explicit mock response Checking whether a known frontend state renders correctly Stable and focused, but does not prove that the live service currently returns that response
Seeded backend data Checking more of the frontend-to-backend path with controlled data More integration coverage, with dependencies on the seeded environment and its upkeep
Live service response Checking behavior that specifically depends on the real service Can vary over time or with timing, so it is a poor sole source of determinism for a visual-state test

Mocking narrows what a test proves: it can show that the frontend renders correctly against a known response, but it cannot establish the live service’s current behavior. Keep complementary integration coverage where real backend behavior matters instead of asking one screenshot test to prove both rendering and service correctness.

Control animation, rendering environment, and snapshot scope

  • Keep the environment consistent. Differences in browser, operating system, viewport, and fonts can change rendering independently of application changes. Standardize these inputs where practical.
  • Prevent mid-frame motion. Disable or settle animations for the capture. A framework option that waits for animation during an interaction may not stop unrelated animations across the page.
  • Prefer a focused snapshot. Capture the component or meaningful page region tied to the test question when a full page would add unrelated sources of change. Cypress’s guidance recommends meaningful states and notes the value of a smaller target.
  • Mask narrowly. If truly uncontrolled third-party content remains, mask only that small region. Do not widen the acceptable difference across the entire screenshot to conceal unstable data.

When network idle is not enough

“Network idle” and fixed delays are tempting because they appear to describe readiness, but neither says that the UI under test has reached the expected state. A page can update after a response finishes, and applications with polling or long-lived requests may not become idle. Use a request wait as coordination if useful, then assert an observable application condition before capture.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot a remaining flaky snapshot

  • The screenshot contains old or changing API data: identify the request that supplies the changing region, route it to a stable fixture, and verify the expected text or state before capture.
  • The request wait passes but the screenshot is early: add an assertion on the final UI state rather than another arbitrary sleep.
  • Playwright routing does not see a request: check Service Worker handling and consider serviceWorkers: 'block' for native route handling.
  • Only part of the screenshot changes: check for animation, fonts, viewport or environment differences, and uncontrolled third-party content. Control the source where it is in scope; mask only the smallest unavoidable region.
  • You cannot tell what changed or when: inspect request outcomes and timing alongside the screenshot and DOM state. Chromatic documents unstable-test diagnostics that include network requests, console logs, DOM snapshots, and snapshot metadata. Chromatic documentation

When managed visual-testing tools help

Framework-native routing and assertions are enough to control many network-driven states. Managed visual-testing or review services can be useful when a team also needs screenshot review or diagnostics; Chromatic documents Playwright integration and unstable-test traces. That does not make a managed service necessary for deterministic responses: the test still needs to control its inputs and identify the expected UI state. Chromatic documentation

Or skip the browser setup

For a screenshot delivered by an API rather than a test runner, ScreenshotNeo accepts one GET request with a URL and returns an image or PDF. Its clean-shot steps can accept consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers say which page verdict and billing status applied. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for AI agents and other MCP clients. Plans include 1,000 screenshots per month free with no card, with paid plans starting at $5 for 3,000. See ScreenshotNeo.

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

For example, using the URL and output format from the documented request:

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 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.
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. For a controlled local visual regression test, framework routing and UI assertions remain the way to define a known test state; a screenshot API call is not a replacement for those assertions.

Sign up for 1,000 free screenshots a month, with no card.

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.