Hardware FixRecommendedDevice not working? Your driver may be the problemCheck updates for common hardware issues.Fix DriversOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsSlow PC?RecommendedPC slow today? Run a repair scan before it gets worseResolve common Windows issues and optimize system performance.Scan Now×
Skip to content
World desk5 min

How to Compare Full-Page Screenshots in Puppeteer Tests

Puppeteer captures full-page screenshots; a visual-regression tool compares them with reviewed baselines. Learn how to keep captures repeatable and review diffs.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Capture the page with Puppeteer’s page.screenshot({ fullPage: true }), then compare that image with a reviewed baseline using a visual-regression tool. Puppeteer handles capture; a matcher such as jest-image-snapshot or a lower-level library such as pixelmatch handles comparison. Keep the rendering conditions consistent and inspect the diff before updating a baseline.

Capture the full page with Puppeteer

Puppeteer’s ScreenshotOptions.fullPage setting requests a screenshot of the full page; it is false by default. PNG is the documented default screenshot type. The official guide demonstrates navigating with waitUntil: 'networkidle2' before capture, but that wait condition does not guarantee that every page has reached a visually stable state.

As an Amazon Associate I earn from qualifying purchases.

Install Puppeteer in your project if it is not already available, then use a script such as this:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  try {
    const page = await browser.newPage();
    await page.setViewport({ width: 1280, height: 800 });
    await page.goto('https://example.com', { waitUntil: 'networkidle2' });
    await page.screenshot({ path: 'page.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

The viewport is set explicitly so the capture has a deliberate layout width. Choose values that match your test environment and keep them fixed when creating and checking baselines. Puppeteer’s guide and API reference document the capture method and options: Screenshots guide and ScreenshotOptions API.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
  • WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
  • A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents

Compare the capture with an approved baseline

A screenshot test has distinct capture and comparison steps. Puppeteer renders and saves or returns an image; a visual-regression tool compares that image with a reference image. A baseline is the expected appearance that your team has reviewed and accepted—not simply the first file the test happened to produce.

Jest with jest-image-snapshot

jest-image-snapshot integrates image comparison with Jest and supports baseline workflows, diff output, configurable difference thresholds, and pixelmatch or SSIM comparison modes. A minimal matcher shape is:

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
  • 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
  • SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
  • INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
  • THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
expect(await page.screenshot({ fullPage: true }))
  .toMatchImageSnapshot();

Configure the matcher and browser setup according to the versions of Jest and jest-image-snapshot used by your project; the snippet illustrates the test assertion, not a complete Jest configuration. The project documents pixelmatch as its default comparison method and SSIM as an alternative; it describes SSIM as experimental, so verify its current behavior before making it part of a required test policy. See the jest-image-snapshot documentation.

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.

Direct pixel comparison with pixelmatch

pixelmatch is a lower-level JavaScript library for pixel-level image comparison. It accepts image data and can report the number of different pixels and generate a diff image. It is useful when you want to control how images are loaded, compared, and reported rather than use a Jest matcher’s baseline workflow. See the pixelmatch project.

Rank #3
Sale
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
  • Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
  • Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
  • In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
  • Ultra-thin bezels: Maximize your viewing experience with thin bezels.

Choose a comparison policy deliberately

Approach What it provides What to consider
jest-image-snapshot Jest matcher and baseline-oriented workflow; documents pixelmatch and SSIM comparison options. Thresholds and comparison mode affect sensitivity. Its documentation describes SSIM as experimental; check the current project documentation before relying on it.
pixelmatch Direct pixel-level comparison, including a differing-pixel count and diff image. You implement the surrounding image loading, baseline management, and test reporting appropriate to your setup.

A stricter pixel policy may flag minor rendering variation; a more permissive one can overlook small but meaningful visual defects. There is no universal threshold that fits every application. Start by examining actual diffs and the project’s visual risk, then set and review a threshold as a test-policy choice rather than treating it as a magic stability fix.

Make full-page captures repeatable

Visual comparisons are useful only when the two captures are made under sufficiently comparable conditions. Keep settings and inputs consistent, and control content that changes independently of the code under test.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
  • SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
  • MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
  • KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
  • INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
  • Fix the viewport and, where they affect rendering, the device scale factor, browser version, locale, timezone, and test data.
  • Wait for the state the test needs. networkidle2 is one documented navigation option, not a guarantee that animations, delayed scripts, or application updates are finished. For page-specific readiness, wait for a meaningful selector or application signal.
  • Freeze or disable animations and time-dependent content when they are not the feature being tested. Mock volatile network responses; mask or exclude genuinely dynamic regions if your chosen comparison tool supports it.
  • Use the same screenshot type and capture settings for baseline and current images, including fullPage, background, clipping, and other options relevant to your test.
  • Keep the baseline, current screenshot, and diff available for review. Adjust tolerance only after identifying the source of noisy differences.

Review failures before updating a baseline

A failed image comparison means the rendered images differ according to the tool’s comparison policy; it does not, by itself, prove that the change is a defect. Inspect the previous baseline, the new capture, and the diff image. Decide whether the difference is an unintended regression, expected content variation, or an intentional design change. Update the approved baseline only after that review.

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

Jest distinguishes ordinary snapshots, which serialize values to text, from visual-regression tools that compare screenshots. Its documentation describes the latter as screenshot-based pixel comparison: Jest snapshot testing.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
  • 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
  • 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot common failures

  • The image is only the visible viewport: Check that the call includes fullPage: true. The option defaults to false.
  • The screenshot is taken before the page is ready: A navigation wait may not cover page-specific asynchronous rendering. Wait for the element or application state the test actually needs.
  • Diffs change between runs: Look for animations, clocks, randomized content, external feeds, unmocked requests, or mismatched browser and viewport settings. Control these inputs before loosening the comparison threshold.
  • Many pixels differ after a browser or environment change: Confirm that baseline and current captures use the intended same browser version, viewport, device scale factor, locale, timezone, and screenshot options. Rebaseline only if the resulting visual change is understood and accepted.
  • The test reports a failure but the page looks acceptable: Inspect the generated diff and identify whether the mismatch is benign variation or a meaningful defect. A tolerance setting encodes a trade-off; it does not replace review.
  • The baseline was updated but the test still fails: Check the matcher’s configured snapshot location, comparison mode, threshold, and which test output is being used as the reference. Configuration details depend on the installed package and test setup.

Or skip the browser setup

ScreenshotNeo is a screenshot API and MCP server for developers. A single GET request can return a screenshot or PDF. Its capture flow accepts cookie or consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or 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 screenshot and PDF tools for AI agents.

For a one-off capture, replace the example URL with the page you want. See the ScreenshotNeo API documentation for request options and response details.

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

ScreenshotNeo is not a substitute for a reviewed visual-regression baseline and diff workflow; use that workflow when your goal is to detect changes over time in tests. ScreenshotNeo’s Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card required.

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

Frequently Asked Questions

Does Puppeteer compare screenshots by itself?

No. Puppeteer captures the image; use a matcher or image-diff library to compare it with a baseline.

Does fullPage include content that has not loaded yet?

It requests a full-page capture, but it does not ensure that delayed or asynchronous content has finished rendering. Wait for the page state your test requires before capturing.

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 *

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
PC Slower Than It Used to Be?Free scan - under a minute
Crashes, No Sound, or Screen Glitches?Free driver 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.