Recommended Free Tools
To take a screenshot with Playwright, navigate to a page and call await page.screenshot({ path: 'screenshot.png' }). That saves the current viewport as a PNG. Set fullPage: true to capture the full scrollable page, use clip for a rectangle, or call screenshot() on a locator to capture one element.
Capture a page with Playwright
The examples below use JavaScript and Playwright’s async API. The same Page API is available with other Playwright languages; use the documentation for your installed version if an option is not recognized. The official screenshot example uses WebKit, though Chromium and Firefox can also be used.
Save the current viewport
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png' });
await browser.close();
})();
Install Playwright and its browser binaries in your project before running the script. For an existing browser and page, the essential line is just await page.screenshot({ path: 'screenshot.png' }). With no options, Playwright captures the current viewport; fullPage defaults to false.
With a path, Playwright writes the image to that file. Without a path, it returns the screenshot data as bytes, which you can process in memory or pass to another tool instead of writing an intermediate file. See the Playwright Page API for the current option reference.
#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
Capture the full scrollable page
await page.screenshot({ path: 'full-page.png', fullPage: true });
This extends the capture beyond the current viewport to include the page’s scrollable content. It is different from taking a viewport shot after scrolling: the latter records only what is visible at that moment.
Capture a rectangular region
await page.screenshot({
path: 'region.png',
clip: { x: 20, y: 80, width: 640, height: 400 }
});
The clip object specifies the rectangle’s position and dimensions. Choose coordinates and size for the region you need; a clipped capture is useful when a full viewport contains unrelated content.
Capture one element
Call screenshot() on a locator to capture an element rather than the whole page:
await page.getByRole('link', { name: 'Learn more' }).screenshot({
path: 'link.png'
});
Locator screenshots wait for actionability checks and scroll the target into view. They do not make an element visible if another element covers it. For a scrollable container, the screenshot includes only the content currently scrolled into view, not every item in that container. See the Playwright Locator API.
Free tools Windows power users keep installed
One-click scans. No signup required.
Choose image format, quality, and scale
Page screenshots support PNG, JPEG, and WebP. When you provide a path, its extension determines the image type; without a path, PNG is the default. Pick the format and scale based on how the image will be used:
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
- PNG: a lossless option. The
qualitysetting does not apply to PNG. - JPEG: useful when a smaller lossy image is acceptable. Its documented default quality is 80.
- WebP: another supported format; WebP quality 100 is lossless.
For example, await page.screenshot({ path: 'page.webp', type: 'webp', quality: 80 }) saves a WebP image at the requested quality. If setting type, make it agree with the intended output file extension.
scale: 'css'produces one output pixel per CSS pixel and a smaller image on high-DPI displays.scale: 'device'captures at device-pixel resolution. On high-DPI displays the resulting image can be twice as large or more.
Use CSS scale when consistent CSS-sized output or lower image size matters; use device scale when you need the higher pixel resolution.
Make captures repeatable
Pages can change while a screenshot is being taken: a caret may blink, an animation may move, or a live widget may update. Playwright’s screenshot options let you control some of that variation. For stable test images, choose settings that reflect what the test is meant to verify:
animationscan disable animation. Finite animations are fast-forwarded to completion; infinite animations are canceled to their initial state and resumed after the screenshot.caretcan hide the text cursor so a blinking insertion point does not cause visual differences.maskcan cover chosen locators when their contents are expected to vary.stylecan apply a stylesheet to change or hide dynamic page elements for the capture.
These options are useful for repeatability, but they change what the image represents. For example, disabling animation is appropriate for a stable visual test, but not when the goal is to document an animation in progress. Consult the Page API screenshot options for exact syntax and availability in your installed version.
Wait for the page without relying on arbitrary sleeps
Do not add a fixed delay just because a screenshot seems early. Playwright discourages waitForTimeout() in production tests because time-based waits are inherently flaky: a delay can be unnecessarily long on a fast run and still too short on a slow one.
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.
Instead, wait for the specific condition your capture depends on—for example, navigation, a relevant selector, or an assertion that the content is ready. The Page API reference notes that “Most of the time, this method is not needed because Playwright auto-waits before every action.” That statement is about waitForLoadState; it is not a claim that every application-specific image or asynchronous widget is automatically ready.
The screenshot API’s own timeout defaults to 0, which means no timeout. Do not confuse that with the test runner’s test timeout or the separate timeout for screenshot assertions; those are distinct settings. Check the rolling Page API, Playwright Test timeout guidance, and your project’s installed-version documentation for the relevant setting.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Use screenshots for visual regression tests
For an expected-image comparison in Playwright Test, use toHaveScreenshot():
import { test, expect } from '@playwright/test';
test('page matches its screenshot', async ({ page }) => {
await page.goto('https://example.com');
await expect(page).toHaveScreenshot();
});
This assertion waits until two consecutive screenshots match and compares the result with the expected snapshot. It is a Playwright Test runner feature, not a general-purpose assertion available in every Playwright setup. Its default animation behavior is disabled. Options such as fullPage, mask, stylePath, and scale can scope or stabilize the comparison. See the PageAssertions API.
Keep the environment consistent when reviewing image diffs: viewport, browser, fonts, device scale, and dynamic content can all affect pixels. A changed image is evidence of a visual difference, not by itself proof that the change is a bug; inspect the diff and decide whether the expected snapshot should change.
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
Save screenshots automatically as test artifacts
If you want screenshots produced by the test runner rather than calling page.screenshot() yourself, configure the use.screenshot mode in Playwright Test. The documented modes include:
off: do not automatically capture screenshots.on: capture screenshots for tests.only-on-failure: capture when a test fails.on-first-failure: capture on the first failure.
Failure-focused modes avoid collecting a screenshot for every passing test when the main purpose is debugging. For the exact configuration and artifact behavior, see the Playwright Test configuration and TestOptions API.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshoot common screenshot problems
The file was not created
- Confirm the script reached the screenshot call and that the process reports no earlier navigation or browser error.
- Check that the output directory exists and is writable. A relative path is resolved from the process’s working directory.
- If you omitted
path, the screenshot is returned as bytes rather than saved to disk; store or process the returned value explicitly.
The screenshot contains only part of the page
The default is the viewport. Set fullPage: true for the full scrollable page, or use clip when you need a chosen rectangle. For a locator capture inside a scrollable container, scroll the container to the desired content before taking the shot; locator screenshots do not capture all of a container’s off-screen content.
The element is missing or obscured
Check that the locator resolves to the intended element and that it is not covered by an overlay. Locator screenshots scroll the target into view and perform actionability checks, but they cannot reveal content hidden behind another element. If the page has a consent dialog or other blocker, handle the page state intentionally before capture.
The screenshot differs between runs
Identify what is changing: animations, caret, timestamps, rotating content, or other dynamic data. Use animation, caret, masking, or stylesheet options where they match the test’s purpose, and wait for a meaningful readiness condition rather than a fixed sleep. For regression assertions, use toHaveScreenshot() so Playwright waits for consecutive matching screenshots.
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.
The screenshot call takes too long or appears to hang
The screenshot API timeout defaults to no timeout. Configure an appropriate timeout for the screenshot operation if needed, and separately review test-level timeouts. Also check whether the page itself is waiting on application work; a screenshot timeout does not substitute for making the page’s required content ready.
Or skip the browser setup
If you need a screenshot of a URL without wiring up a browser script, ScreenshotNeo is a screenshot API and MCP server. Its API accepts a URL in one GET request and can return PNG, JPEG, WebP, or PDF. For the complete parameter reference, see the ScreenshotNeo documentation.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response includes X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. Sign up for free.
Check documentation against your installed version
Playwright’s API references are rolling documentation, not a version-pinned guide. The examples here reflect the documented API, but option availability can vary by installed version. If a recently added option is rejected, check the documentation matching your project’s Playwright version before changing code.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Frequently Asked Questions
Can I get screenshot bytes without saving a file?
Yes. Omit the path option; page.screenshot() returns the screenshot data instead of writing a file.
Can toHaveScreenshot() be used outside Playwright Test?
No. The screenshot assertion is for the Playwright Test runner.
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.

