Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Use Playwright’s page.screenshot() after the page reaches the state you want to record. Add fullPage: true for the entire scrollable document, call locator.screenshot() for one component, or pass a clip rectangle for a precise crop. The same API can return image bytes instead of writing a file, which is useful for comparisons and uploads.

Set up a minimal Playwright screenshot

Install Playwright and its browser binaries in your project:

npm install -D playwright
npx playwright install

This runnable Node.js script opens a page, waits for a useful readiness signal, and writes a PNG:

const { chromium } = require('playwright');

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage({ viewport: { width: 1440, height: 900 } });
  await page.goto('https://example.com', { waitUntil: 'networkidle' });
  await page.screenshot({ path: 'screenshot.png' });
  await browser.close();
})();

page.screenshot() captures the current viewport by default. Navigate, set the viewport, authenticate, dismiss overlays, or wait for application content before calling it; Playwright captures whatever is visible at that instant.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Amazon Basics 50-inch Lightweight Portable Camera Tripod Stand with Quick-Release Plate, Adjustable Height, Aluminum, for Travel Photography, Champagne
  • Camera mount tripod stand with zippered storage bag
  • Adjustable height from 16.1inch to 50inch with 3-section,lever-lock legs for simple adjustments
  • Folds down quickly and made of lightweight aluminum; It weighs only 1.23 lbs,lightweight and portable, easy to carry for travel,hiking,camping,etc
  • 3-way head allows for tilt and swivel motion;portrait or landscape options;Built in Bubble Level,fast and accurate positioning
  • Quick-release plate helps ensure fast transitions between shots

Capture a full-page screenshot

Set fullPage: true to capture the complete scrollable page as if the page fitted on a very tall screen:

await page.screenshot({
  path: 'homepage-full.png',
  fullPage: true
});

Full-page capture is useful for documentation and visual review, but it can produce a very tall image. Pages that lazy-load content may need a scroll or an explicit wait before capture so images and sections have finished rendering.

Wait for content that appears after navigation

await page.goto('https://example.com/dashboard', { waitUntil: 'domcontentloaded' });
await page.locator('[data-testid="dashboard-ready"]').waitFor();
await page.screenshot({ path: 'dashboard.png', fullPage: true });

A selector wait is usually more precise than a fixed delay. Use page.waitForTimeout() only when the site has a known timing requirement that cannot be expressed as a page condition.

Screenshot an element or rectangular region

Capture one component

Use a locator when you want the element’s bounding box rather than the whole page:

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
await page.locator('.header').screenshot({ path: 'header.png' });

The locator must resolve to a visible element. Prefer stable attributes such as data-testid over fragile positional selectors.

Capture a coordinate crop

Pass clip for a rectangle. Coordinates use the page’s top-left origin; x and y identify the top-left corner, while width and height define the dimensions:

await page.screenshot({
  path: 'hero-crop.png',
  clip: { x: 80, y: 120, width: 900, height: 500 }
});

Clip coordinates are viewport coordinates. For a moving or responsive layout, an element locator is safer because Playwright computes its current box.

Rank #2
XXZU 75" Camera Tripod,Aluminum Tripod for Camera Phone/Monopod with Remote
  • 75in Extendable Camera Tripod: This tripod for camera phone can extend to a height of 75 inches by adjusting the flip locks, which can be quickly adjusted to any desired height to meet the needs of various shooting scenarios. Both the ball head and center column are equipped with level for easy real-time level calibration, ensuring perfectly level shots.Good Digital Camera Accessory Kits for you.
  • 3-in-1 Detachable Center Column: The center column supports quick detachment, allowing for flexible use as a monopod or selfie stick (Max Height:43.9 in / 111.5 cm). Camera phone tripod stand can also be installed upside down for low-angle macro shooting. This 3-in-1 multi-functional design simplifies shooting equipment, saves carrying space, and enhances practicality and cost-effectiveness, making it suitable for travelers, outdoor enthusiasts, and content creators.
  • 3-Level Angle Adjustment For Various Terrains: The camera tripod legs can be adjusted to three angles using the angle adjustment locks, allowing it to spread almost horizontally to achieve a minimum height of 15.35in(39cm) for low-angle shooting. Each leg adjusts independently in both angle and length, ensuring the tripod stand steadily on stairs, rocky trails, or uneven ground—making it ideal for outdoor-photographers and hikers shooting in unpredictable environments.
  • Remote Control & Flexible Ball Head: Equipped with a 360° ball head, which supports free rotation in both horizontal and vertical directions. When shooting vlogs or live streams, you can flexibly switch angles and landscape/portrait modes without moving the tripod. In addition, this phone tripod has a built-in remote control with a maximum 10m control distance. Whether it's selfies, group photos, or long-distance shooting, one-button control makes shooting easier and more convenient.
  • Sturdy & Stability: Constructed from aluminum alloy, this DSLR camera tripod features thickened tubes and anti-slip rubber feet that provide stronger grip on various surfaces, effectively preventing image shake. Its bottom hook allows for hanging weights, increasing counterweight and further enhancing overall stability, ensuring smooth footage even outdoors.[Max load 8kg/17.64lb (vertical) or 3kg/6.61lb(45° tilt)]

Choose image format, quality, scale, and background

The filename extension or type selects PNG, JPEG, or WebP. JPEG and WebP support quality from 0 to 100; quality does not apply to PNG, and defaults vary by format.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
await page.screenshot({ path: 'card.webp', type: 'webp', quality: 82 });
await page.screenshot({ path: 'photo.jpg', type: 'jpeg', quality: 85 });
  • PNG: lossless and suitable for text, interfaces, and transparency.
  • JPEG: generally smaller for photographic content; it cannot preserve transparency.
  • WebP: a compact modern format when your downstream tools support it.

scale: 'css' creates one output pixel per CSS pixel. scale: 'device' uses device pixels and can make high-DPI images larger. For a transparent PNG, use omitBackground: true; this option does not apply to JPEG.

await page.screenshot({
  path: 'logo-transparent.png',
  omitBackground: true,
  scale: 'css'
});

Make captures deterministic

Visual regression requires the same state on every run. Control time-dependent content before taking the image.

Disable animation and transitions

await page.screenshot({
  path: 'stable.png',
  animations: 'disabled'
});

With animations disabled, finite animations are fast-forwarded to completion. Infinite animations are canceled at their initial state and replayed afterward. Page screenshots otherwise default to allowing animations.

Mask volatile regions

await page.screenshot({
  path: 'masked.png',
  mask: [page.locator('[data-testid="timestamp"]'), page.locator('.avatar')],
  maskColor: '#444444'
});

Masking covers locator bounding boxes. The default mask color is pink (#FF00FF); set maskColor when a neutral color works better. Invisible elements can also be masked, so constrain your locator to the intended visible region when necessary.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Control the text caret

Page screenshots default to caret: 'hide'. Use caret: 'initial' when the caret is part of the state you need to document.

Normalize the environment

  • Fix the viewport and, when relevant, the browser’s device scale factor.
  • Use deterministic test data and a fixed locale, timezone, and clock in your test setup.
  • Wait for fonts, images, and application-specific ready selectors.
  • Hide ads, rotating banners, chat launchers, and other non-product content with a test-only style or a mask.

Use screenshot bytes instead of a file

If you omit path, Playwright returns the captured image as a buffer. You can send that buffer to object storage, an image comparison library, or an HTTP endpoint:

Rank #3
Sale
K&F Concept 64 inch/163cm Lightweight Aluminum Travel Camera Tripod
  • 【Lightweight and Portable】4 section leg can adjust tripod height from 20.4''/52cm to 64.1''/163cm; it can be folded to 15.5''/39.5cm to make it easy to put it in the carrying bag; the net weight with the ball head included is only 2.53lbs/1.15 KG.
  • 【360 Degree Ball Head】36mm ball head can be rotated to any angle you want, helping to improve the range of camera activity during panning. It can withstand up to 17.6lbs/8kg.The 360-degree panning dial lets you set up precision shots to capture the beauty of landscapes.
  • 【Efficient and Flexible】With powerful and quick flip leg lock, only use one hand can open and close all the buttons in a few seconds. It's very easy to use, saving you more time and can more focused on enjoying the shooting.
  • 【Versatile Ability】The center column inverted installation (also with a short center column) to achieve the lowest angling shooting, archery and special photography.
  • 【More Compatibility】This camera tripod with standard 1/4'' thread,which can be applied to most Arca-Swiss quick release plates; 1/4" screw is suitable for most cameras, DSLR camera, projector and telescope, etc.
const image = await page.screenshot({ type: 'png' });
await uploadToObjectStorage(image, 'runs/home.png');

This avoids temporary files and lets your pipeline decide how to persist or compare the result.

Visual regression with Playwright Test

In the Playwright Test runner, use toHaveScreenshot() to capture and compare a snapshot:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import { test, expect } from '@playwright/test';

test('account page matches its baseline', async ({ page }) => {
  await page.goto('https://example.com/account');
  await page.getByRole('heading', { name: 'Account' }).waitFor();
  await expect(page).toHaveScreenshot('account.png', {
    animations: 'disabled',
    maxDiffPixelRatio: 0.01
  });
});

The assertion waits until two consecutive page screenshots are identical before comparing the final image. Screenshot assertions work with the Playwright Test runner, not with an arbitrary standalone script. Set maxDiffPixels or maxDiffPixelRatio when your project has an explicit tolerance; choose a threshold deliberately because a larger tolerance can hide real regressions.

Options at a glance

Need Option or method What it does
Viewport or whole document page.screenshot() / fullPage: true Captures the visible viewport or complete scrollable page.
Component locator.screenshot() Captures the locator’s bounding box.
Crop clip: { x, y, width, height } Captures a rectangular viewport region.
Format type or extension Selects PNG, JPEG, or WebP.
Compression quality Sets JPEG/WebP quality from 0–100; not used for PNG.
Pixel density scale: 'css'|'device' Chooses CSS pixels or device pixels.
Transparency omitBackground: true Removes the default background except for JPEG.
Motion animations: 'disabled' Stops or completes animations for a stable image.
Dynamic data mask, maskColor Covers locator boxes, including invisible matches.
Caret caret: 'hide'|'initial' Controls whether a text caret appears.
Validation expect(page).toHaveScreenshot() Compares a stabilized screenshot in Playwright Test.

Troubleshoot common failures

The screenshot is blank or only partly rendered

Cause: capture occurred before the application rendered, a navigation failed, or a required frame was not ready. Check the response and console, wait for a meaningful selector, and verify the URL before capture. For lazy content, scroll through the page or wait for the image elements you require.

“Locator resolved to hidden” or element screenshots fail

Cause: the locator matches a hidden copy, a collapsed component, or no element. Tighten the selector, wait for visibility, and confirm that it resolves to exactly the intended element.

Full-page output misses content

Cause: content is loaded only after scrolling or after a client-side request. Trigger the page’s lazy-loading behavior, wait for the relevant sections, then capture. A fixed delay alone can be unreliable when network or rendering time varies.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Images differ between runs

Cause: animations, timestamps, random data, fonts, viewport differences, or third-party widgets. Disable animations, mask volatile locators, freeze test data, install the same fonts, and fix viewport and browser settings.

Rank #4
VICTIV 74” Camera Tripod, Tripod for Camera and Phone with Phone Holder
  • 【74 Inch Tall Tripod and Compact Tripod】 This tall camera tripod has a height adjustment range of 19-74 inches. It can meet the needs of daily work. This compact tripod comes with a carrying bag for outdoor and indoor shooting. This compact tripod weighs 3.14 lbs / 1.4 kg and is easy to store and stow
  • 【Tripod for All Camera and Phone】Standard 1/4" screw mount compatible with all cameras ( Canon, Nikon, Fujifilm, Olympus, Panasonic), DSLR, SLR, and digital cinema cameras, also spotting scopes, projector, compact camcorders, binoculars. The 360° phone mount is compatible with iPhone 17 16 15 14 13 12 11 Pro/XS/XR/MAX/8/8 Plus/X/7 Plus/7/6s Plus/6s/6 Plus/6/Samsung Galaxy S22/ S21 Series/ Galaxy Z Flip/ NOTE/ One Plus 1+Series
  • 【Professional 3-Way Pan Head】VICTIV Professional camera tripod stand is equipped with a stable and smooth 3-way pan head, it allows 360° horizontal panoramic shots, 180° up and down shots, and 90° vertical portraits. Non-slip pads provide great grip. You can also hang a backpack on the weight hook for extra stability
  • 【Video Tripod for Photography】The video camera tripod is suitable for outdoor and indoor shooting. It can meet the daily shooting needs of video producers, video bloggers, and youtube users. Camera tripods for Photography, food shooting, live streaming, scenery shooting, and portrait shooting, etc
  • 【Complete Tripod Units】What You Get: 1X Tripod for cell phone and camera, 1X Universal Phone Holder, 1X Extra Quick Release Plate,1X 3-way Pan Head, 1X Handle, 3X Non-slip pads. Please contact us anytime if any questions

Transparency is not preserved

Cause: JPEG has no alpha channel, or the page background was not omitted. Use PNG with omitBackground: true and ensure the elements themselves do not paint an opaque background.

Visual assertions fail intermittently

Cause: the page is still changing when the assertion starts. Wait for a stable application signal, disable animations, remove rotating content, and use a narrowly justified diff threshold rather than ignoring all differences.

Performance, reliability, and operating cost

Capture time and memory grow with page complexity, image count, and full-page height. Keep screenshots at the smallest viewport and format that answers the question. Use CSS scale for ordinary regression baselines; device scale is appropriate when you explicitly need high-DPI output but creates larger files. Element captures and clips are cheaper to store and compare than an entire long page.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

For CI reliability, reuse a controlled browser setup, close pages and browsers in teardown, limit parallel captures to the resources your runner has, and retain the failing image and metadata (URL, viewport, commit, and browser version). Playwright itself does not provide a hosted screenshot quota; your cost is the compute, storage, and CI time used by your environment.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Or skip the browser setup

ScreenshotNeo is a website screenshot API and MCP server. One GET request returns a PNG, JPEG, WebP, or PDF. It accepts cookie and consent banners like a visitor, then removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and the response identifies the result with X-Page-Verdict and X-Billed headers.

For a one-call image capture, see the ScreenshotNeo documentation:

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The equivalent Python request is:

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 also supports full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets or any viewport, retina scale, PDF paper size/margins/landscape/page ranges, HTML/CSS to image, custom CSS and JavaScript, pre-capture clicks, hidden selectors, waits for a selector/delay/network idle, blocking ads/trackers/requests/resource types, custom headers/cookies/user agent/Authorization, timezone and geolocation, transparent backgrounds, resizing, selectable cache TTL, signed public-image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, an OpenAPI specification, and compatibility with parameter names used by other screenshot APIs.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients, so an AI agent can capture pages without you wiring a browser. Every plan includes every feature: Free provides 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account to try it.

Best Value
Sale
CAMBOFOTO 74″ Camera Tripod, Phone Tripod for iPhone Lightweight Tripod
  • Adjustable 20″–74″ Height: Easily extend from tabletop to full height for portraits, vlogs, outdoor photography, travel shots, and events — perfect for photographers and content creators of all levels.
  • Heavy Duty & Stable: Durable aluminum legs support up to 8.8 lbs, so it can take DSLRs, mirrorless cameras, ring lights, GoPros, and smartphones securely without wobble.
  • Multi-Device Compatibility: Includes quick release plate & phone mount — switch effortlessly between camera and phone setups for photos, live streams, podcasts or video calls.
  • 360° Pan & Tilt Head: Smooth, fluid head movement lets you capture wide panoramas, dynamic video clips, and precise compositions without stiff dragging.
  • Travel Ready & Lightweight: Weighing only 2.8 lbs and folding compactly for storage, this tripod is built for backpacks, road trips, hikes, and everyday use. Includes carry bag for convenience.

FAQ

Can Playwright save a screenshot as a buffer?

Yes. Omit path from page.screenshot(); the returned buffer can be uploaded or compared directly.

Is fullPage the same as a tall viewport?

It captures the complete scrollable page rather than permanently changing the browser viewport, producing the effect of a very tall screen.

Which method should I use for a design-system component?

Use locator.screenshot() with a stable component selector, then disable animations and mask any intentionally variable content.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When should I choose a hosted API?

Choose one when you want captures without maintaining browser binaries, navigation cleanup, retries, storage, or an agent integration. Keep Playwright when browser-level control and in-process test assertions are the primary requirements.

Frequently Asked Questions

Can Playwright save a screenshot as a buffer?

Yes. Omit path from page.screenshot(); the returned buffer can be uploaded or compared directly.

Is fullPage the same as a tall viewport?

It captures the complete scrollable page rather than permanently changing the browser viewport, producing the effect of a very tall screen.

Which method should I use for a design-system component?

Use locator.screenshot() with a stable component selector, then disable animations and mask any intentionally variable content.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

When should I choose a hosted API?

Choose one when you want captures without maintaining browser binaries, navigation cleanup, retries, storage, or an agent integration. Keep Playwright when browser-level control and in-process test assertions are the primary requirements.

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.