Capture the page with Puppeteer’s page.screenshot({ fullPage: true }), then compare that image with a reviewed baseline using a visual-regression tool. Puppeteer takes the screenshot; a matcher such as jest-image-snapshot or a lower-level library such as pixelmatch performs the comparison. Review any diff before updating the baseline: a changed image signals a rendering difference, not necessarily a defect.
Capture the full page with Puppeteer
Puppeteer’s ScreenshotOptions.fullPage option requests a screenshot of the full page; its documented default is false. PNG is the documented default image type. The Puppeteer guide shows navigation with waitUntil: 'networkidle2' before capture, but that wait does not guarantee that every page has finished changing visually. Puppeteer screenshots guide · ScreenshotOptions API
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 shown is an example, not a universal standard. Choose dimensions and other rendering inputs that match your test’s purpose, then use the same values for both the baseline and later runs.
Compare the screenshot with a reviewed baseline
A visual regression test captures an image and compares it to an expected image. This is different from a regular Jest snapshot, which serializes values such as objects or text. Jest describes visual regression tools as comparing screenshots pixel by pixel. Jest snapshot testing
#1 Best Overall
- 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
Use a Jest matcher with jest-image-snapshot
jest-image-snapshot provides a Jest matcher and a baseline workflow. Its documentation covers configuring difference thresholds and comparison methods, including pixelmatch and SSIM. The README identifies pixelmatch as the default method and describes SSIM as experimental; check the package’s current documentation and compatibility with your Jest setup before relying on a particular configuration. jest-image-snapshot documentation
After installing and configuring the package for your project, a test can take this general form:
Rank #2
- 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();
This example assumes the matcher has been registered according to the package documentation. Confirm the setup and options against the versions installed in your project.
Use pixelmatch when you want lower-level control
pixelmatch is a JavaScript library for pixel-level image comparison. It accepts image data and can produce a differing-pixel count and a diff image, leaving you to build the surrounding test and baseline workflow. pixelmatch project
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Rank #3
- 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 how sensitive the comparison should be
| Approach | What it does | Best fit | Consideration |
|---|---|---|---|
jest-image-snapshot |
Provides a Jest matcher and baseline-oriented workflow; documents pixelmatch and SSIM comparison options. | Jest tests that benefit from matcher and snapshot update mechanics. | Thresholds are policy choices, not universal recommendations. Its documentation describes SSIM as experimental. |
pixelmatch |
Compares image pixels and can report differences and generate a diff image. | Tests that need a lower-level pixel comparison library and a custom workflow. | You provide the surrounding baseline, reporting and review workflow. |
A more permissive threshold can ignore small rendering variation but may also hide a meaningful small defect. A stricter setting can expose subtle changes while flagging harmless noise. Set tolerance according to the project’s rendering variability and the risk of missing a visual regression. Do not adopt a tool’s default as a project recommendation without checking the version and inspecting actual diffs.
Make full-page comparisons repeatable
Visual diffs are useful only when you can distinguish product changes from changes in the capture environment or page state. Keep these inputs consistent wherever they affect rendering:
Rank #4
- 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
- Browser version, viewport, device scale factor, locale, timezone and test data.
- Screenshot options such as image type,
fullPage, background and clipping. - The page state under test. Wait for an application-specific selector or readiness signal when necessary; use a navigation wait such as
networkidle2only as one part of the setup. - Time-dependent or unpredictable content. Freeze animations and clocks when they are irrelevant, mock volatile responses, and mask or exclude genuinely dynamic regions if your chosen tooling supports it.
These controls are testing practices, not guarantees made by Puppeteer’s screenshot API. A page can still change after navigation because of animations, clocks, randomized content, external feeds or resources that load asynchronously.
Review diffs and update baselines deliberately
- Capture the current page using the same browser setup, test data and screenshot options as the expected image.
- When comparison fails, inspect the old baseline, the new screenshot and the generated diff. Locate the changed area and decide whether it represents a defect, expected design change or rendering noise.
- Fix the cause of unintended change or noise where practical. Adjust tolerance only after identifying what is producing the differences.
- Update the baseline only when the visual change is intentional and reviewed. Keep the change visible in the same code review as the related application change.
Troubleshoot common mismatches
| Symptom | Likely cause | What to try |
|---|---|---|
| Large areas differ on every run | Viewport, browser, device scale factor, locale, timezone or test data differs between runs. | Pin those inputs and capture the baseline and current image in the same environment. |
| Only images or lower-page sections differ | Lazy-loaded resources or asynchronous content may not be ready when capture begins. | Wait for the relevant page element or application readiness signal, then confirm that the content is present before taking the screenshot. |
| Text or layout moves slightly between captures | Fonts, animation, time-dependent content or external data can alter layout and rendering. | Stabilize the relevant inputs; disable irrelevant animation, freeze time or mock volatile responses as appropriate. |
| The full-page image does not match the expected dimensions | The baseline and current run may use different viewport or screenshot settings. | Compare capture configuration, including fullPage, viewport, device scale factor and image type. |
| Many harmless pixels cause a failed test | The comparison may be more sensitive than the project’s rendering environment allows. | Inspect the diff first, identify the noise source and then decide whether to stabilize rendering or adjust the threshold. |
| A changed baseline hides a bug | The new image was accepted without checking what changed. | Review the before, after and diff images before updating; do not automatically approve every new baseline. |
Or skip the browser setup
If you need an image from a URL without building and maintaining a Puppeteer capture flow, ScreenshotNeo is a website screenshot API and MCP server. A single GET request can return a PNG, JPEG, WebP or PDF; its API accepts many parameter names used by other screenshot APIs, which can make switching easier. This is a capture alternative, not a replacement for comparing the result with your approved baseline.
Best Value
- 【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.
For example, save a WebP screenshot of the target page using cURL:
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 and setup. ScreenshotNeo accepts cookie and consent banners before capture and removes 60+ known consent platforms, newsletter popups and chat widgets; each of those cleanup steps 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 offers take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 screenshots.
Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Frequently Asked Questions
Does Puppeteer compare screenshots by itself?
No. Puppeteer captures the image; use a visual-regression matcher or image comparison library to compare it with a baseline.
Does waiting for networkidle2 guarantee a stable screenshot?
No. It is a navigation wait option, not a guarantee that animations, clocks, external feeds or other changing page content have stopped.
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.

