Free tools Windows power users keep installed
One-click scans. No signup required.
In a Playwright script, enable a screenshot by navigating to a page and calling await page.screenshot({ path: 'screenshot.png' }). Add fullPage: true for the entire scrollable document. In Playwright Test, configure use.screenshot for automatic artifacts, or use expect(page).toHaveScreenshot() when you want visual-regression comparisons.
Take your first Playwright screenshot
Install Playwright, install its browser binaries, then run a script that launches Chromium, opens a page and saves an image. The extension in path determines the image format.
- Install the library: run
npm install playwright. If you use the test runner, install@playwright/testinstead or in addition. - Install browsers: run
npx playwright install(or install only the browser your project uses). - Create a script: save the following as
screenshot.js.
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();
})();
Run it with node screenshot.js. The file is written relative to the process working directory. If you omit path, the method returns image bytes instead of writing a file.
Choose what to capture
Viewport or full page
page.screenshot() captures the current viewport by default. Set fullPage: true to capture the complete scrollable page.
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 →#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
await page.goto('https://example.com/docs');
await page.screenshot({
path: 'docs-full.png',
fullPage: true
});
Full-page mode can produce a very tall image. Use the ordinary viewport mode for monitoring a fixed screen size, and full-page mode for documentation, audits or page-level visual checks.
One element with a locator
When only a component matters, screenshot its locator rather than the whole page. The locator waits for the element according to Playwright’s normal actionability rules.
const card = page.locator('[data-testid="pricing-card"]');
await card.screenshot({ path: 'pricing-card.png' });
A clipped region
Use clip when you need a rectangle in page coordinates. Supply an object with x, y, width and height.
await page.screenshot({
path: 'header-region.png',
clip: { x: 0, y: 0, width: 1280, height: 180 }
});
Screenshot options that change the output
| Option | Use it for | Important detail |
|---|---|---|
path |
Saving an image file | The file extension selects PNG, JPEG or WebP when supported by the API. |
fullPage |
The entire scrollable document | Defaults to false; set it to true. |
type |
Explicit image format | Use when you do not want format inferred from the path. |
quality |
JPEG or WebP size control | Quality applies to lossy formats, not PNG. |
omitBackground |
Transparent output | Useful when the page background is transparent or you are compositing the result. |
scale |
CSS-pixel or device-pixel sizing | Choose consistent scaling when comparing files from different machines. |
mask |
Hiding changing regions | Mask locators whose content is intentionally nondeterministic. |
animations |
Stable captures | Control animation handling so a transition is not caught halfway through. |
For example, this produces a compressed WebP, hides a live clock and captures the whole page:
await page.screenshot({
path: 'report.webp',
fullPage: true,
type: 'webp',
quality: 82,
mask: [page.locator('.live-clock')]
});
Make dynamic pages deterministic
A screenshot records the rendered state at the instant the call runs. Navigate first, then wait for the content that proves the page is ready instead of relying on an arbitrary sleep.
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
await page.goto('https://example.com/dashboard');
await page.locator('[data-testid="dashboard"]', { state: 'visible' });
await page.screenshot({ path: 'dashboard.png', fullPage: true });
If a page has a known loading transition, a short delay can be used deliberately, but a selector that represents finished content is usually more meaningful. Make the viewport explicit when the layout is responsive:
const context = await browser.newContext({
viewport: { width: 1440, height: 900 },
deviceScaleFactor: 1
});
const page = await context.newPage();
Use the same browser, viewport, scale, fonts and operating-system environment for visual baselines. Rendering can vary with browser version, operating system, hardware, power source, settings and headless mode.
Enable screenshots in Playwright Test
Capture automatically
Automatic test screenshots are disabled by default. Set the use.screenshot option in playwright.config.ts:
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 →import { defineConfig } from '@playwright/test';
export default defineConfig({
use: {
screenshot: 'only-on-failure'
}
});
The supported modes are:
off— never create an automatic screenshot (the default).on— create one for every test.only-on-failure— create one when a test fails.on-first-failure— create one on the first failure in a retry sequence.
Use on when every test result needs an image. Use a failure mode when screenshots are diagnostic artifacts and you want to limit disk usage.
Compare against a visual baseline
For visual regression, use the Playwright Test runner’s screenshot assertion:
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.
import { test, expect } from '@playwright/test';
test('homepage visual check', async ({ page }) => {
await page.goto('https://example.com');
await expect(page).toHaveScreenshot();
});
The assertion can target a page or locator and accepts screenshot controls such as a name, full-page capture, clipping, masks and animation or caret settings. It waits for two consecutive screenshots to match before comparing with the expected image, which helps avoid comparing during a brief rendering change.
Use a locator when the page shell contains unrelated changes:
test('checkout summary is stable', async ({ page }) => {
await page.goto('https://example.com/checkout');
await expect(page.locator('[data-testid="summary"]'))
.toHaveScreenshot('summary.png');
});
toHaveScreenshot() is a Playwright Test assertion. In a plain Node script, use the Page or Locator screenshot() API instead.
Attach a screenshot to a test result
When you need an image in the test report, capture bytes and attach them through testInfo:
import { test } from '@playwright/test';
test('attach evidence', async ({ page }, testInfo) => {
await page.goto('https://example.com');
const screenshot = await page.screenshot();
await testInfo.attach('screenshot', {
body: screenshot,
contentType: 'image/png'
});
});
You can also write to a test-specific path with testInfo.outputPath('screenshot.png'), then pass that path to page.screenshot().
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
Common errors and fixes
No image appears after the test
If you expected an automatic artifact, check playwright.config.ts. The default screenshot mode is off. Either set a use.screenshot mode or call page.screenshot() explicitly.
The image shows only the visible screen
Add fullPage: true. Without it, Playwright intentionally captures only the viewport.
toHaveScreenshot is undefined
Run the test with Playwright Test and import test and expect from @playwright/test. A standalone script that imports playwright has the Page and Locator screenshot methods but not the test-runner assertion.
Browser executable is missing
Install the Playwright-managed browsers with npx playwright install. In a container or CI image, perform that step during image setup so the test process can find the browser.
The screenshot is flaky
Wait for a meaningful ready-state selector, freeze or mask clocks and rotating content, set a fixed viewport, and keep browser and operating-system versions consistent. Avoid baselining a page while fonts, images or animations are still changing.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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 page times out before capture
Inspect navigation and locator waits separately to find which stage is slow. Verify the URL is reachable from the runner, then increase the relevant timeout only when the page legitimately needs more time. A larger timeout will not fix a blocked request or a selector that never appears.
The full-page image is too large
Capture a locator or clipped region when the test does not need the entire document. For full-page evidence, choose WebP or JPEG with an appropriate quality value, or reduce the device scale so fewer pixels are written.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Performance, reliability and storage choices
- Capture scope: locator and clipped screenshots are usually cheaper in time and storage than very tall full-page images.
- Format: PNG preserves lossless detail; JPEG and WebP can reduce artifact size when quality loss is acceptable.
- Parallel tests: each worker can create its own files, but use unique names or test output paths to avoid overwriting artifacts.
- Baseline discipline: generate and compare images in a consistent environment. A baseline made on one operating system or browser build can differ from an otherwise identical run elsewhere.
- Failure artifacts: failure-only modes keep reports manageable while still showing the state that caused a failure.
Or skip the browser setup
If you need an HTTP screenshot service instead of managing Playwright browsers, ScreenshotNeo is the first service to try for clean captures: it removes consent banners, newsletter popups and chat widgets before capture, bills only clean shots, and has a $5 paid plan for 3,000 shots.
Use the API documentation at https://screenshotneo.com/docs/ for all parameters. A single GET request returns an image or PDF:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The same request in 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)
And in 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}`);
ScreenshotNeo accepts full-page and element captures, custom CSS and JavaScript, clicks before capture, waits for selectors, delays or network idle, blocked requests and resource types, headers, cookies, user agents, authorization, timezone and geolocation. It also supports dark mode, device presets, retina scale, PDF options, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Its MCP server exposes take_screenshot, get_page_info and capture_pdf to Claude, Cursor and other MCP clients.
Bot checks, CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and response headers identify the page verdict and whether the request was billed. Plans include Free (1,000 shots per month, no card), Starter ($5 for 3,000), Growth ($15 for 15,000), Pro ($39 for 60,000), Scale ($99 for 250,000) and Business ($249 for 1,000,000). Yearly billing gives two months free, and every feature is included on every plan.
Create a free ScreenshotNeo account to get 1,000 screenshots a month without a card.
Quick Recap
Which Playwright screenshot method should you use?
| Goal | Recommended method |
|---|---|
| Save one image from a script | page.screenshot({ path: 'file.png' }) |
| Capture the entire page | Add fullPage: true |
| Capture one component | locator.screenshot() |
| Keep an image for every test | Set use.screenshot: 'on' |
| Capture only diagnostic failures | Set use.screenshot: 'only-on-failure' or 'on-first-failure' |
| Detect unintended visual changes | Use expect(page).toHaveScreenshot() in Playwright Test |
| Use a hosted capture endpoint | Call ScreenshotNeo’s API |
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.

