Halloween DealsAmazon USHalloween week deals: useful picks before month-endAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PCHalloween DealsAmazon USOctober picks are moving - compare before checkoutAmazon US: current deals, useful picks and tech finds.See Picks×
FREEDOM251

Freedom251 › Blog › Browser Testing

Playwright Full-Page Screenshots Stop at the Viewport: How to Capture the Whole Page

By Freedom251 Team · · 5 min read

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

For an explicit Playwright screenshot, set fullPage: true in JavaScript or TypeScript, or full_page=True in Python. Without that option, a direct screenshot captures the visible viewport. If the image still omits lower-page content, check whether that content has actually loaded before capture: full-page mode sets the capture extent, but does not guarantee that lazy or interaction-triggered content has been activated.

First identify how the screenshot is being made

Playwright has several screenshot paths, and they do not all use the same setting. A direct API call, a visual assertion, a pytest failure artifact, and the command-line screenshot each have their own configuration.

As an Amazon Associate I earn from qualifying purchases.

Capture path Full-page setting What to check
Direct JavaScript or TypeScript API fullPage: true Set it in the page.screenshot() options.
Direct Python API full_page=True Set it in the page.screenshot() options.
Screenshot assertion fullPage: true Pass the option to toHaveScreenshot().
Playwright Test pytest plugin failure screenshot Enable screenshots and the plugin’s full-page flag Both controls are needed; automatic screenshots are viewport-only by default.
Playwright CLI screenshot --full-page Do not confuse it with --hires, which changes pixel resolution.

Capture the whole scrollable page with a direct API call

JavaScript or TypeScript

Set fullPage: true in the options passed to page.screenshot():

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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: 'full-page.png', fullPage: true });
  await browser.close();
})();

This captures the full scrollable page rather than only the visible viewport. The screenshot API also offers options such as output type and path, clipping, scale, animation handling, and caret visibility; those affect output or reproducibility, but do not replace fullPage: true. See the Playwright screenshot API reference.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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

Python

In synchronous Python, use full_page=True:

from playwright.sync_api import sync_playwright

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    page.goto("https://example.com")
    page.screenshot(path="full-page.png", full_page=True)
    browser.close()

In asynchronous Python, await the screenshot call and use the same snake-case option:

from playwright.async_api import async_playwright

async def main():
    async with async_playwright() as p:
        browser = await p.chromium.launch()
        page = await browser.new_page()
        await page.goto("https://example.com")
        await page.screenshot(path="full-page.png", full_page=True)
        await browser.close()

See the Playwright Python screenshot guide.

Set full-page extent for screenshot assertions

If the screenshot is produced by a Playwright Test visual assertion rather than an explicit page.screenshot() call, pass the full-page option to toHaveScreenshot():

await expect(page).toHaveScreenshot({ fullPage: true });

The assertion’s stability behavior is separate from capture extent: it waits for two consecutive screenshots to match each other before comparing against the expectation. That settling step does not itself make the screenshot full-page. See the screenshot assertion reference.

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

Configure automatic pytest failure screenshots

For automatic screenshots attached to failures through Playwright Test’s pytest plugin, check both settings: screenshot capture must be enabled, and full-page screenshots must be enabled. The plugin’s automatic screenshots are viewport-only by default, and its full-page flag requires screenshots to be enabled.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB | 1920×1080 LED Monitor, 4ms GtG, Adaptive Sync, HDMI 1.4, Tilt Adjust, Low Blue Light, 4yr Advance Replacement Warranty
  • 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

Use the option names and supported values documented for the version of the plugin installed in your project; plugin settings are not interchangeable with the direct page.screenshot() argument. The pytest plugin reference documents its screenshot controls.

Use the CLI for a one-off full-page capture

When capturing from the command line, use the full-page flag:

npx playwright screenshot --full-page https://example.com full-page.png

The CLI’s --hires option changes output to device pixels; it is not a substitute for --full-page. The CLI guide documents these as separate choices: Playwright CLI screenshot guide.

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

Why a full-page screenshot can still look incomplete

fullPage controls how much of the scrollable page is captured. It does not guarantee that every below-the-fold section has been fetched or rendered. A site may load images only after scrolling, reveal content after a click, or wait for a particular network response.

Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • 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.
  • If the missing section is lazy-loaded, reproduce the page behavior that triggers loading before capture.
  • If content appears only after interaction, perform the relevant click or other action first.
  • If the page fetches content asynchronously, wait for the relevant response or a page-specific selector before taking the screenshot.
  • For visual tests, make sure the expected content is present before relying on the screenshot assertion’s stabilization behavior.

These are page-specific loading conditions; full-page capture is not a universal instruction to scroll through and activate every deferred element. The official Playwright screenshot guide describes screenshot capture, but does not promise universal activation of lazy or interaction-triggered content.

Troubleshoot the common causes

The screenshot is exactly the viewport

Cause: The call uses the default screenshot extent, or the full-page option is set on a different capture path than the one producing the file.

Fix: Locate the actual screenshot trigger and set the corresponding option: fullPage: true, full_page=True, the pytest plugin controls, or --full-page for the CLI.

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

The bottom of the image is present, but its content is blank or incomplete

Cause: The capture reaches the page’s scrollable extent, but the missing content has not loaded or been activated.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • 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

Fix: Wait for the content’s selector or network response, or perform the scroll or interaction that causes the page to populate that section.

A pytest failure artifact remains viewport-sized

Cause: Automatic screenshot capture or the full-page setting is not enabled. The full-page flag alone does not enable screenshot artifacts.

Fix: Enable screenshot mode and the full-page flag together, following the documentation for your installed plugin version.

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

A CLI capture is high-resolution but still viewport-sized

Cause: --hires was used without the full-page option.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【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.

Fix: Add --full-page; resolution and capture extent are separate controls.

A visual assertion is unstable or differs from its expected image

Cause: The page may not have reached the intended state, or the assertion’s image differs from the expectation. Full-page extent and assertion stabilization solve different problems.

Fix: Ensure the relevant content is loaded before comparison, then set the full-page option on the assertion if the expected image covers the whole page. The assertion waits for two consecutive screenshots to match each other before comparing; that behavior is not a substitute for triggering page-specific content loading.

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.
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 can return a website screenshot with one GET request. Cookie banners are accepted and more than 60 known consent platforms, newsletter popups, and chat widgets are removed before the shot; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response identifies the page verdict and billing status in headers. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.

For API options, see the ScreenshotNeo documentation. Example cURL call:

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

Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month without a credit card.

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.

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

Browser TestingJavaScriptPlaywrightPythonscreenshotsWeb development

Leave a Reply

Your email address will not be published. Required fields are marked *

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

Recommended PC Tool
Recommended PC Tool
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.