Use Playwright’s Page API: launch a browser, open the URL with page.goto(), call page.screenshot(), then close the browser. The default image is the visible viewport; add fullPage: true for the complete scrollable page, or use a locator to capture one element.
Set up Playwright
This walkthrough uses Node.js and the Playwright library. Install it in a new project, then install at least one browser engine.
mkdir url-shot
cd url-shot
npm init -y
npm install playwright
npx playwright install chromium
Playwright also supports WebKit and Firefox. Install those engines when your target or test environment requires them, and launch the matching engine in your script.
Capture a URL in Node.js
The smallest useful script launches Chromium, creates a page, navigates, saves a PNG, and always closes the browser:
#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
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();
}
})();
Run it with node screenshot.js. The path value is resolved relative to the process’s current working directory, and the image type is inferred from its extension. Replace the URL and filename for your project.
Choose what to capture
Viewport screenshot
page.screenshot() captures the area currently visible in the page viewport. Set the viewport explicitly when a repeatable layout matters:
const page = await browser.newPage({
viewport: { width: 1440, height: 900 }
});
await page.goto('https://example.com');
await page.screenshot({ path: 'viewport.png' });
Full-page screenshot
Pass fullPage: true to request the entire scrollable page rather than only the viewport:
await page.goto('https://example.com');
await page.screenshot({
path: 'full-page.png',
fullPage: true
});
For very long documents, the resulting image can be large. If downstream systems have size or memory limits, capture a defined region with clip, or capture important sections separately.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
One element
Use a locator when you need a component such as a header, chart, or card. Playwright performs actionability checks and scrolls the matched element into view before taking the image:
await page.goto('https://example.com');
await page.locator('.header').screenshot({ path: 'header.png' });
The locator must still be attached when the screenshot runs. A framework rerender that detaches the element produces an error; locate it again after the page reaches its stable state.
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
Capture into memory
Omit path to receive the screenshot bytes as a buffer. This is useful when you will upload the image, hash it, or pass it to another service without creating a temporary file:
const image = await page.screenshot({ type: 'webp' });
await uploadToStorage(image);
Documented output types include PNG, JPEG, and WebP. Use the extension when saving to disk, or set type when working with a buffer.
Free tools Windows power users keep installed
One-click scans. No signup required.
Useful screenshot options
| Option | Use it when | Example |
|---|---|---|
fullPage |
You need the complete scrollable document. | { fullPage: true } |
clip |
You need a rectangular region. | { clip: { x: 0, y: 0, width: 800, height: 600 } } |
scale |
You want CSS-pixel output or device-pixel output. | { scale: 'css' } |
animations |
You want CSS and Web Animations disabled during capture. | { animations: 'disabled' } |
path |
You want Playwright to write a file. | { path: 'shot.webp' } |
type |
You are returning a buffer and need a format. | { type: 'jpeg' } |
For visual tests, masking dynamic regions and applying a stylesheet can make comparisons stable. Keep those controls close to the screenshot call so the capture policy is obvious.
Make navigation and rendering deterministic
Navigate before capturing
A screenshot is taken from the current page. Always call page.goto(url) (or another navigation method) before the screenshot API. Navigation failures should be handled rather than silently producing an unusable artifact.
const response = await page.goto('https://example.com', {
waitUntil: 'domcontentloaded',
timeout: 30000
});
if (!response) {
throw new Error('Navigation returned no response');
}
await page.screenshot({ path: 'ready.png' });
The right readiness condition is site-specific. If the page renders its main content after JavaScript runs, wait for a meaningful selector or a known application state before capturing:
await page.goto('https://example.com/dashboard');
await page.locator('[data-testid="dashboard"]')
.waitFor({ state: 'visible', timeout: 30000 });
await page.screenshot({ path: 'dashboard.png' });
A fixed delay can help with a short, known animation, but a selector or application-ready signal is usually more repeatable than guessing a sleep duration.
Recommended Free Tools
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 motion and changing content
Disable animations when a moving transition would make captures inconsistent:
await page.screenshot({
path: 'stable.png',
animations: 'disabled'
});
For visual regression work, use Playwright Test’s expect(page).toHaveScreenshot(). The first run creates a reference image and later runs compare against it. Rendering can vary with the host operating system, browser version, settings, hardware, power source, headless mode, and other environment details. Keep the baseline and comparison environment consistent.
Python Playwright example
If your automation is Python-based, the same sequence is available through the synchronous API:
from pathlib import Path
from playwright.sync_api import sync_playwright
with sync_playwright() as p:
browser = p.chromium.launch()
try:
page = browser.new_page(viewport={"width": 1440, "height": 900})
page.goto("https://example.com", wait_until="domcontentloaded", timeout=30000)
page.screenshot(path=Path("screenshot.png"), full_page=True)
finally:
browser.close()
Install the Python package with pip install playwright, then run playwright install chromium to install the browser binary.
Common failures and fixes
“Executable doesn’t exist” or browser launch failure
Install the browser binaries for the engine you launch. For Chromium, run npx playwright install chromium (or playwright install chromium in a Python environment). In a restricted CI image, also verify that the process is allowed to start a headless browser.
Navigation timeout
The page did not reach the selected navigation condition within the timeout. Check the URL and network access, increase the timeout for a legitimately slow page, and wait for a specific content selector instead of assuming every site becomes ready at the same point.
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
Blank or incomplete image
The screenshot may have run before client-side rendering finished. Wait for a visible application selector, a page-specific ready state, or a short documented delay. If the page requires an interaction to reveal content, perform that interaction before calling screenshot().
Element locator screenshot fails
The selector may match no element, match an element that is hidden, or refer to a node detached during a rerender. Confirm the selector, wait for visibility, and resolve the locator immediately before capture. Avoid holding a stale element handle across navigation or major UI updates.
Visual diff changes between machines
Use the same browser engine and version, operating-system image, viewport, scale, fonts, and headless settings for both baseline and comparison runs. Disable animations and mask volatile content. Differences caused by rendering environments are not necessarily application regressions.
Performance and reliability practices
- Reuse one browser process for a batch of URLs and create isolated pages or contexts for each capture; launching a new browser for every image adds avoidable startup work.
- Choose viewport, format, and scale deliberately. Full-page and device-pixel captures consume more memory than a viewport-sized CSS-pixel image.
- Use element or clipped captures when a downstream job needs only a component, reducing file size and comparison noise.
- Record the URL, browser engine, viewport, output format, and readiness condition with each artifact so a failed capture can be reproduced.
- Close pages, contexts, and the browser in a
finallyblock, including when navigation or screenshot errors occur.
Or skip the browser setup
If you only need a URL-to-image request, ScreenshotNeo provides an HTTP API and an MCP server for developers. It accepts consent banners like a visitor 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 the response reports the result in X-Page-Verdict and X-Billed headers.
One GET request returns PNG, JPEG, 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
See the ScreenshotNeo API documentation for all parameters. The same request in Python is:
import requests
r = requests.get(
"https://api.screenshotneo.com/v1/shot",
params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"},
timeout=90,
)
r.raise_for_status()
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}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const image = Buffer.from(await res.arrayBuffer());
ScreenshotNeo includes full-page and CSS-selector captures, dark mode, 12 device presets plus custom viewports, retina scale, PDF paper and page controls, custom CSS and JavaScript, clicks, selector or network-idle waits, ad/tracker/request blocking, headers, cookies, user agents, Authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API, an OpenAPI specification, and compatibility with parameter names used by other screenshot APIs. Its MCP tools—take_screenshot, get_page_info, and capture_pdf—let Claude, Cursor, and other MCP clients capture pages.
PC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minute| Plan | Included shots | Price |
|---|---|---|
| Free | 1,000 per month | $0, no card |
| Starter | 3,000 | $5 |
| Growth | 15,000 | $15 |
| Pro | 60,000 | $39 |
| Scale | 250,000 | $99 |
| Business | 1,000,000 | $249 |
Yearly billing gives two months free, and every feature is available on every plan. Create a free ScreenshotNeo account to get 1,000 screenshots each month without a card.
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.
FAQ
Does Playwright automatically know when a page is visually finished?
No. Navigation and rendering are separate concerns. Define a readiness rule that matches the application, such as a visible content selector, before capturing.
Why would I return a buffer instead of saving a file?
A buffer lets a script upload, transform, hash, or stream the image directly, avoiding temporary-file cleanup and local path handling.
Can I compare screenshots from different computers?
You can, but differences in operating system, browser, hardware, fonts, and rendering settings can create noise. Use a controlled, repeatable environment for trustworthy visual comparisons.
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 minuteFrequently Asked Questions
Does Playwright automatically know when a page is visually finished?
No. Choose a page-specific readiness condition, such as a visible content selector, before capturing.
Why return a screenshot buffer instead of writing a file?
A buffer can be uploaded or processed directly, without temporary-file handling.
Can screenshots from different computers be compared reliably?
Only with care: browser, operating-system, hardware, fonts, viewport, and rendering settings should remain consistent.
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.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →

