DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run Scan×
Skip to content
World desk4 min

Puppeteer Screenshots With Animations Disabled: Reduce Visual Test Flakiness

Puppeteer screenshot options do not include an animation switch. Learn how to suppress CSS motion, handle JavaScript animation, and wait for a stable page state.

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.

Puppeteer does not document an animations: 'disabled' option for page.screenshot(). For CSS animations and transitions, inject a test-only stylesheet before capturing; for JavaScript-driven motion, wait for an application-specific settled state or use a test hook. Neither method makes every page deterministic by itself.

Disable CSS animations and transitions before the screenshot

Use page.addStyleTag() after navigation and before capture. The stylesheet below sets animation and transition durations and delays to zero, and disables smooth scrolling so it does not interfere with a stable view.

As an Amazon Associate I earn from qualifying purchases.

const puppeteer = require('puppeteer');

(async () => {
  const browser = await puppeteer.launch();
  const page = await browser.newPage();

  try {
    await page.goto('https://example.com', { waitUntil: 'networkidle2' });

    await page.addStyleTag({
      content: `
        *, *::before, *::after {
          animation-duration: 0s !important;
          animation-delay: 0s !important;
          transition-duration: 0s !important;
          transition-delay: 0s !important;
          scroll-behavior: auto !important;
        }
      `,
    });

    await page.screenshot({ path: 'page.png' });
  } finally {
    await browser.close();
  }
})();

This is a practical CSS mitigation, not a Puppeteer screenshot setting. Puppeteer’s documented Page.screenshot() API and ScreenshotOptions describe capture options such as clipping and full-page capture, but not an animation-disabling property. Page.addStyleTag() adds a style element to the page.

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

Understand the visual trade-off

Zeroing durations can change how a page reaches its final appearance. It can also suppress transitions that a test is intended to verify. Use this stylesheet for screenshots whose goal is a stable static rendering, not for tests of motion or transition behavior. If the final state depends on an animation completing, check the resulting screenshot and adjust the test or application hook rather than assuming the injected rule preserves every animation’s intended outcome.

#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

Use reduced-motion emulation when the app supports it

Puppeteer can make the page report a reduced-motion preference:

await page.emulateMediaFeatures([
  { name: 'prefers-reduced-motion', value: 'reduce' },
]);

await page.goto('https://example.com', { waitUntil: 'networkidle2' });
await page.screenshot({ path: 'page.png' });

See Puppeteer’s Page.emulateMediaFeatures() documentation and the W3C WAI technique for prefers-reduced-motion. Emulation changes the preference exposed to the page; it does not universally stop motion. The page must contain CSS or other code that responds to the preference. W3C notes that some users experience distraction or nausea from animated content, and describes this technique as an example rather than a mandatory WCAG requirement.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • 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

Handle JavaScript animation and dynamic application state separately

The CSS rule does not freeze arbitrary JavaScript-driven motion such as timers, canvas drawing, animation libraries, or code scheduled with requestAnimationFrame. For those cases, make the test wait for a meaningful, application-specific boundary: for example, a component reporting that it has settled or a test-only control that places it in a deterministic state.

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

Puppeteer’s Page class documents evaluateOnNewDocument(), which runs after document creation and before page scripts. That can support a narrowly designed test hook, but it is not a universal way to freeze every JavaScript animation. The hook must match the application’s implementation and be validated against the states the test is meant to capture.

Rank #3
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.

Wait for page readiness as well as motion control

Animation suppression and page readiness are separate concerns. Puppeteer’s screenshots guide demonstrates waiting for network idle, but network idle does not prove that all application state has settled. A page can still update after requests stop, and an application can keep requests active while otherwise being ready for the particular capture.

Choose a readiness condition that matches the page under test. Use a navigation wait condition appropriate to its network behavior, then wait for an app-specific selector or settled-state signal when needed. Avoid treating a fixed sleep as a general guarantee: it can be too short on a slow run and needlessly long on a fast one.

Rank #4
Acer 27in FHD 1920x1080 IPS 120Hz Gaming Monitor | Office KB272 G0bi
  • Incredible Images: The Acer KB272 G0bi 27" monitor with 1920 x 1080 Full HD resolution in a 16:9 aspect ratio presents stunning, high-quality images with excellent detail.
  • Adaptive-Sync Support: Get fast refresh rates thanks to the Adaptive-Sync Support (FreeSync Compatible) product that matches the refresh rate of your monitor with your graphics card. The result is a smooth, tear-free experience in gaming and video playback applications.
  • Responsive!!: Fast response time of 1ms enhances the experience. No matter the fast-moving action or any dramatic transitions will be all rendered smoothly without the annoying effects of smearing or ghosting. A 120Hz refresh rate speeds up the frames per second to deliver smooth 2D motion scenes in gaming and video.
  • 27" Full HD (1920 x 1080) Widescreen IPS Monitor | Adaptive-Sync Support (FreeSync Compatible)
  • Refresh Rate: Up to 120Hz | Response Time: 1ms VRB | Brightness: 250 nits | Pixel Pitch: 0.311mm
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Why visual screenshots remain flaky

Animation is only one possible source of variation. A screenshot can differ because capture occurs before the intended state, because the page changes asynchronously, or because the test suppresses behavior that affects the appearance being tested. Separate the failure into two questions: did the page reach the correct state, and was that state rendered consistently?

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • If CSS motion is the variable, apply a scoped stylesheet or use reduced-motion behavior that the application implements.
  • If JavaScript motion is the variable, control it through an application-specific test state or wait for a meaningful settled condition.
  • If content changes after navigation, wait for the relevant app state rather than relying only on network idle.
  • If motion itself is under test, do not apply a rule that removes the behavior being tested.

The cited Puppeteer and Playwright documentation does not provide head-to-head flakiness measurements or a quantified reduction in failures from disabling animations.

Best Value
Sale
MNN 15.6" FHD 60Hz Portable Monitor USB-C HDMI IPS HDR Gaming Laptop
  • Full HD Portable Monitor - MNN 15.6inch portable laptop monitor with 1920*1080 resolution, advanced IPS glossy screen support 178° full viewing angle, it renders accurate and bright color, draws you into the video or game with lifelike colors and amazing detail.It can effectively reduce blue light radiation damage, no flickering, eye-care, and make it easier to watch for a long time.A second monitor for working from home.
  • Double Type-C Port -For Plug & Play, the MNN monitor provides 2 Full Feature Type-C ports. Only One USB Type-C Cable is required to connect to the power supply & display signal transmission. NOTE: Your device should support thunderbolt 3.0 or USB 3.1 Type C DP ALT-MODE.which supports multiple connect ways to your laptops, PC, Phones, Macbooks, PS5/PS4, Xbox, and Switch.
  • Lightweight Ultra Slim for Travel - As a portable external monitor,MNN portable laptop monitor easily accommodate to every suitcase and backpack and stress-free when you are holding it for a long time. They are truly portable computer monitors for travelers, students, gamers,engineers, and everyone.
  • Give consideration to work and games - through multiple display modes [Copy Mode/Extended Mode/Second Screen Mode/Portrait Mode], we can bring you a clear second screen in the meeting, and expand the screen anytime and anywhere to improve work efficiency and improve the quality of life. Adjusting to HDR mode can upgrade the image to a new level, providing you with brighter highlights,deeper and more realistic colors, more realistic images, and amazing viewing/gaming experience.
  • Powerful Smart Cover - MNN portable external monitor can work in both landscape and portrait mode, can be used as a gaming monitor, screen extender for laptop or phone. Comes with a scratch-proof smart cover made of durable PU leather exterior, doubles as a stand, provides comprehensive protection for this portable computer monitor.

Do not confuse Puppeteer with Playwright’s screenshot assertion option

Playwright documents animations: 'disabled' for screenshot assertions; it is not Puppeteer syntax. Playwright’s PageAssertions API says finite animations are fast-forwarded to completion, while infinite animations are canceled to their initial state for the screenshot and then played again afterward. Its visual comparisons guide also describes applying a custom stylesheet to filter volatile elements, which addresses changing content rather than serving as a universal animation freeze.

For Puppeteer, use the injected CSS, reduced-motion emulation where supported by the page, or app-specific control described above. These approaches differ: CSS alters rendered behavior, media emulation supplies a preference the app may honor, and an app-specific settled condition synchronizes capture with application state.

Or skip the browser setup

If you need a screenshot without setting up Puppeteer, ScreenshotNeo returns a screenshot or PDF from one GET request. Its clean-shot behavior accepts cookie and consent banners like a visitor and removes known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. ScreenshotNeo also provides an MCP server with screenshot tools for AI agents.

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

Example cURL request:

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 documentation for request options. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for free.

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