Recommended Free Tools
For a deterministic Playwright screenshot, pass animations: 'disabled' to page.screenshot() or a locator’s screenshot() method. This disables CSS animations, CSS transitions, and Web Animations while the capture is taken. Finite animations are fast-forwarded to completion; infinite animations are canceled at their initial state for the screenshot and then resumed. Direct screenshots otherwise allow animations by default. See the Page API and Locator API.
Choose the right animation control
Playwright has two related but different screenshot workflows. A direct page or locator screenshot captures the current rendered state, and its animations option defaults to 'allow'. A Playwright Test visual assertion, such as toHaveScreenshot(), is designed to wait for a stable image and defaults to disabling animations.
| Workflow | Default | What to use | Best for |
|---|---|---|---|
page.screenshot() |
allow |
animations: 'disabled' when needed |
One-off captures, reports and generated assets |
locator.screenshot() |
allow |
animations: 'disabled' when needed |
Capturing one component or element |
expect(page).toHaveScreenshot() |
disabled |
Override with animations: 'allow' only when motion is intentional |
Visual regression tests |
The distinction matters: disabling animation for a direct screenshot is an explicit choice, while screenshot assertions already apply the stability behavior documented in the PageAssertions API and LocatorAssertions API.
Disable animations in a page screenshot
Use this complete Node.js example with Playwright Test or a regular Playwright script:
Free tools Windows power users keep installed
One-click scans. No signup required.
#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
import { chromium } from 'playwright';
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com', { waitUntil: 'networkidle' });
await page.screenshot({
path: 'page-stable.png',
fullPage: true,
animations: 'disabled'
});
await browser.close();
The option is named animations and accepts 'disabled' or 'allow'. When disabled, Playwright stops CSS animations, CSS transitions and Web Animations for the capture. It does not mean that every animation is paused at an arbitrary point: finite animations are completed, while infinite animations are canceled to their initial state temporarily and replayed after the screenshot.
Capture the current motion instead
If the purpose is to document what a visitor currently sees—including a carousel frame or an in-progress transition—leave the default in place or set it explicitly:
await page.screenshot({
path: 'current-frame.png',
animations: 'allow'
});
Use this mode only when changing the animation state would make the image less truthful to the intended experience. For repeatable visual tests, allowing motion commonly introduces timing-dependent pixels.
Disable animations for one element
Locator screenshots support the same option. The locator must resolve to the element you want to capture:
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →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
const card = page.getByRole('article', { name: 'Pricing' });
await card.screenshot({
path: 'pricing-card.png',
animations: 'disabled'
});
This is useful when an animated page contains a static component you want to compare independently. It avoids making the entire page deterministic when only one region matters.
Use screenshot assertions for visual regression
Screenshot assertions are part of the Playwright Test runner. They take screenshots until two consecutive captures match, then compare the result with the stored snapshot. Their documented default is animations: 'disabled'.
import { test, expect } from '@playwright/test';
test('home page is visually stable', async ({ page }) => {
await page.goto('https://example.com');
await expect(page).toHaveScreenshot('home.png');
});
test('only the navigation is compared', async ({ page }) => {
await page.goto('https://example.com');
await expect(page.getByRole('navigation')).toHaveScreenshot('nav.png');
});
If a test intentionally verifies motion, override the assertion option:
await expect(page).toHaveScreenshot('animated-state.png', {
animations: 'allow'
});
Normally, keep the default disabled behavior and assert application state separately—for example, wait for a visible heading or a completed network request—rather than relying on a particular animation frame.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.
Finite versus infinite animations
Finite CSS or Web Animations
A finite animation has a defined endpoint. With animations: 'disabled', Playwright fast-forwards it to completion before capture. If that animation would emit transitionend, the completion behavior allows that event to fire. A screenshot therefore represents the final state, not the first frame.
Infinite animations
An animation with an infinite iteration count cannot be fast-forwarded to a final frame. Playwright cancels it at its initial state for the screenshot and restores it afterward. Spinners, pulsing skeletons and continuously rotating icons consequently appear in their initial state in a disabled-animation capture.
Why this affects expected images
- A button that slides in over 300 milliseconds may appear fully visible.
- A loading spinner may appear at its starting rotation rather than halfway through a turn.
- A transition triggered by a hover or click can finish before the image is taken.
Design the expected snapshot around the stable state your product promises, not an incidental intermediate frame.
Reduced motion is a separate setting
Some applications change their CSS when the prefers-reduced-motion media feature is set. Playwright can emulate that preference through the test configuration’s reducedMotion setting. The documented default is 'no-preference'; you can choose 'reduce' or 'no-preference' as appropriate. This emulates what the page believes the user prefers. It is separate from the screenshot operation’s animations option.
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
import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
reducedMotion: 'reduce'
}
});
You can combine the settings: use reduced-motion emulation to exercise the application’s accessibility path, and use animations: 'disabled' when the capture itself must be stable. A page may still contain animations that do not honor the media query, so reduced-motion alone is not a universal screenshot freeze.
Reliable capture procedure
- Navigate and establish state. Use a deterministic URL, test data and an explicit wait such as
waitForLoadState('networkidle')only when it reflects your application’s behavior. - Wait for meaningful UI. Prefer a locator assertion such as
await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible()over a fixed sleep. - Trigger required state. If a menu or dialog is animated, click it and wait for its visible or enabled condition.
- Capture with the correct mode. Pass
animations: 'disabled'for deterministic output, or'allow'when motion itself is the subject. - Keep the environment consistent. Use the same browser engine, viewport, device scale factor, fonts and color-scheme settings for baseline and comparison images.
Troubleshooting animation-related failures
| Symptom | Likely cause | Fix |
|---|---|---|
| Two screenshots differ on every run | Direct screenshot is allowing animation, or the page has time-based content. | Set animations: 'disabled'; wait for a semantic ready condition; freeze clocks or data in your test environment where applicable. |
| Snapshot shows a completed transition unexpectedly | Disabled mode fast-forwards finite animations. | Expect the final state, or use animations: 'allow' if the intermediate frame is the requirement. |
| A spinner is always at one angle | Infinite animation is canceled to its initial state during capture. | Assert the loading state separately, or allow animation for a deliberately motion-based image. |
| Reduced-motion CSS is not applied | The context is using the default no-preference, or the site does not honor the media query. |
Configure reducedMotion: 'reduce' and verify the application’s CSS; still use the screenshot option for capture determinism. |
| Assertion times out while the page keeps changing | The assertion cannot obtain two consecutive matching screenshots. | Disable animations (the default), remove rotating timestamps or ads from the test fixture, and wait for the component’s ready state. |
| Locator screenshot captures the wrong region | The locator matches multiple or moving elements. | Use a role, label or test id that resolves to one element, then inspect its bounding box and visibility before capture. |
Performance, fidelity and maintenance
Disabling animation adds stabilization work because Playwright must process the page’s animation state before producing the image. The payoff is repeatability. Keep screenshots focused with locator assertions when a full-page baseline is unnecessary; smaller images are easier to review and less sensitive to unrelated page changes.
Do not use a long arbitrary delay as a substitute for animation control. A delay can miss a slower transition, waste time on a faster one and still leave infinite motion nondeterministic. Semantic waits plus the animation option communicate intent and survive UI timing changes better.
When a visual diff is legitimate, update the baseline deliberately and record why. If the diff is caused by a moving third-party widget, hide or stub that region in the test fixture rather than weakening every screenshot with broad tolerances.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.
Or skip the browser setup
If you need a rendered image rather than a Playwright test, ScreenshotNeo provides a screenshot API and MCP server. Its cleaning step accepts cookie or consent banners and removes more than 60 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 report the page verdict and whether the shot was billed. An MCP server exposes take_screenshot, get_page_info and capture_pdf to Claude, Cursor and other MCP clients.
One GET request returns PNG, JPEG or WebP (or a PDF):
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python:
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)
Node.js:
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
See the ScreenshotNeo documentation for options such as full-page and selector capture, custom CSS or JavaScript, waits, device presets, dark mode, PDF settings, blocking rules, headers and cookies, geolocation, caching, signed links, asynchronous webhooks and bulk capture. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.
Frequently Asked Questions
Does disabling animations change the page permanently?
No. Infinite animations are canceled only for the capture and replayed afterward; the documented finite-animation handling fast-forwards them to completion for that screenshot.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteCan I disable only one animation?
The screenshot option applies to the page or locator capture. To target one effect, use a locator screenshot or add test-only CSS that disables a specific selector, then capture the desired region.
Are screenshot assertions available in Playwright Library alone?
The consecutive-match behavior and toHaveScreenshot() assertions are features of the Playwright Test runner.
The Bottom Line
Use animations: 'disabled' for deterministic direct screenshots, rely on the default disabled behavior of toHaveScreenshot() for visual tests, and reserve 'allow' for captures where motion itself is the required result.
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.

