Use Playwright’s page.screenshot() to save a website image for documentation or another artifact. For automated visual regression testing, use Playwright Test’s toHaveScreenshot(): it creates a baseline on the first run and compares later captures against it. The distinction matters—a screenshot is an image; a visual assertion is a repeatable test against an expected image.
Capture a website screenshot with Playwright
Playwright’s Page API models a page as one browser tab. The basic sequence is to launch a browser, create a context and page, navigate to the target, capture the image, and close the browser. Install Playwright for your project using its official setup instructions, then run this Node.js script:
As an Amazon Associate I earn from qualifying purchases.
const { chromium } = require('playwright');
(async () => {
const browser = await chromium.launch();
try {
const page = await browser.newPage();
await page.goto('https://example.com');
await page.screenshot({ path: 'screenshot.png' });
} finally {
await browser.close();
}
})();
The path option writes the image to a file. If you omit it, page.screenshot() returns an image buffer, which you can pass to other code or save yourself. See the Playwright Page API for the current method signature and screenshot guide for supported options; available parameters depend on the Playwright version installed in your project.
Free tools Windows power users keep installed
One-click scans. No signup required.
Choose the capture scope
- Viewport: the visible browser area is the natural choice for an above-the-fold artifact or a fixed-size visual test.
- Full page: set
fullPage: trueto capture scrollable content beyond the current viewport:await page.screenshot({ path: 'full-page.png', fullPage: true }); - Clipped area: use the screenshot API’s clip option when you need a specified rectangular portion of the page. Check the installed version’s API documentation for the accepted clip coordinates and dimensions.
- Element: capture a particular page element when the installed Playwright API supports the element screenshot method. This can be more useful than a full-page image when documenting one component.
For images, the screenshot API documents format-related options, including image format and quality where supported. Consult the API reference for details and version-specific constraints rather than assuming every option applies to every output format.
#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
Turn a capture into a visual regression test
Saving an image does not tell a test whether the page changed. Playwright Test’s toHaveScreenshot() assertion adds that comparison behavior. It requires the Playwright test runner. On the initial run, the assertion creates an expected image; later runs capture the page and compare the result with that reference.
const { test, expect } = require('@playwright/test');
test('homepage matches its screenshot', async ({ page }) => {
await page.goto('https://example.com');
await expect(page).toHaveScreenshot();
});
The assertion waits for two consecutive screenshots to match before comparing the last capture, helping avoid a comparison against an intermediate changing frame. Keep generated reference images under version control with the tests so a change can be reviewed alongside its code.
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
Accept intentional design changes carefully
When a UI change is intentional, regenerate expected images with the test runner’s update-snapshots option. Review the resulting image changes before committing them; updating a baseline without inspection can make an unintended visual change appear expected. The Playwright visual comparisons guide explains snapshot behavior and baseline maintenance.
Make screenshots repeatable
A pixel difference is evidence that two rendered images differ, not proof by itself of a user-visible defect. Playwright warns: “Browser rendering can vary based on the host OS, version, settings, hardware, power source (battery vs. power adapter), headless mode, and other factors.” Run comparisons in the same environment used to generate the reference images whenever possible.
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.
Control sources of variation
- Keep the environment aligned: use consistent browser and host settings for baseline creation and later runs. Changes to the operating system or browser can affect rendered pixels.
- Wait for the intended state: navigate and perform any required setup before capturing. If the page is still loading or changing, the image may not represent the state you meant to test.
- Handle animation: screenshot assertions can disable animations to reduce frame-to-frame variation. Consult the Playwright assertions documentation for the current option and behavior.
- Filter volatile content: apply a stylesheet to hide or neutralize elements that change independently of the UI under test, such as dynamic timestamps. Playwright documents styling options for screenshot assertions in its visual comparisons guide.
- Choose a stable scope: compare a viewport, full page, element, or clip according to what the test is intended to protect. A larger capture can include more unrelated dynamic content.
Choose the right workflow for the job
| Need | Use | What you get |
|---|---|---|
| Save an image for documentation or another system | page.screenshot() |
An image written to a path, or a buffer if no path is provided. |
| Check whether a page still matches an approved visual state | Playwright Test’s toHaveScreenshot() |
A reference image on the initial run and comparisons against it on later runs. |
| Capture through a managed browser rather than maintaining browser execution in your own test environment | A hosted browser or screenshot service | Managed execution may suit teams that want to outsource browser infrastructure; specific service capabilities vary. |
Troubleshoot common screenshot problems
The image is blank or incomplete
- Confirm that navigation completed and the target URL is correct before calling the screenshot method.
- Make sure the browser remains open until the capture finishes; close it afterward, including on errors.
- If the page is long, enable full-page capture rather than expecting a viewport screenshot to include content below the fold.
The test reports a screenshot difference every run
- Check that baseline and test runs use the same browser and host environment.
- Look for animated or dynamic page content and stabilize or filter it using Playwright’s documented screenshot assertion options.
- Inspect the actual diff before updating the reference. If the change is intended, regenerate snapshots with the update-snapshots option and review them.
An option or method is unavailable
Screenshot parameters and behavior vary by installed Playwright version. Check the API reference corresponding to your version and use an option only if it is supported there. This is especially important for specialized capture scopes and format settings.
Or skip the browser setup
For a direct screenshot request without launching a browser in your own code, ScreenshotNeo provides a website screenshot API and MCP server. One GET request returns an image or PDF. Create an API key, then replace the example URL and save the returned image:
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
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo API documentation for request options. Cookie banners are accepted and removed before the shot, along with supported newsletter popups and chat widgets; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the page verdict and billing status in headers. Its MCP server gives AI agents tools for screenshots, page information, and PDF capture. The free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsSign up free for ScreenshotNeo—1,000 screenshots a month, no card required.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Frequently Asked Questions
Does a Playwright screenshot test compare images automatically?
Yes. Use Playwright Test’s toHaveScreenshot() assertion; page.screenshot() alone only captures an image.
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.
Can a screenshot include the whole scrollable page?
Yes. Use fullPage: true with page.screenshot() when you need content beyond the viewport.
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.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.




