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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

The correct method depends on what scrolls. For an entire document, Playwright Python has a built-in full_page=True option. For a nested panel, table, chat, or menu with its own scrollbar, a normal locator screenshot captures only the visible portion; you must either scroll and stitch multiple images or temporarily expand the element before capturing it.

First decide what you need to capture

“Full screenshot” can describe two different targets:

Target What scrolls Recommended Playwright approach
Full page The document, usually document.scrollingElement page.screenshot(full_page=True)
Scrollable element A nested DOM node such as .results or #chat Scroll-and-stitch or expand-and-capture

These operations are not interchangeable. A page screenshot can include the whole document but does not automatically reveal all content inside an independently scrolling child. Conversely, a locator screenshot is clipped to the element’s rendered bounds.

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

Capture a full scrolling page with Playwright Python

If the browser window’s document is the thing that scrolls, use Playwright’s documented full-page option.

#1 Best Overall
Sale
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • 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

Synchronous Python example

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", wait_until="networkidle")
    page.screenshot(path="full-page.png", full_page=True)
    browser.close()

Asynchronous Python example

import asyncio
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", wait_until="networkidle")
        await page.screenshot(path="full-page.png", full_page=True)
        await browser.close()

asyncio.run(main())

Install the package and browser binaries before running these examples:

python -m pip install playwright
playwright install chromium

full_page=True extends the screenshot to the page’s scrollable height. It does not change the viewport width, and it does not turn a nested scroll container into a full-page target.

Why a locator screenshot is not enough for a scrollable element

For a visible element, this is the normal API:

panel = page.locator(".scrollable-panel")
panel.screenshot(path="panel.png")

When that element has its own scrollbar, Playwright captures its current rendered viewport. Rows or messages below the fold remain outside the image. The screenshot format can be PNG, JPEG, or WebP, and device-pixel scaling changes output resolution; neither setting reveals hidden scroll content.

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

Before choosing an implementation, inspect the actual page:

info = page.locator(".scrollable-panel").evaluate("""el => ({
    clientWidth: el.clientWidth,
    clientHeight: el.clientHeight,
    scrollWidth: el.scrollWidth,
    scrollHeight: el.scrollHeight,
    overflowY: getComputedStyle(el).overflowY
})""")
print(info)

A value where scrollHeight is greater than clientHeight indicates vertical overflow. If the site uses a virtualized list, the DOM may contain only the currently rendered rows, so no screenshot technique can capture rows that the application has not rendered yet without first scrolling through them.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • 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

Strategy 1: scroll, capture, and stitch

Scroll-and-stitch preserves the element’s normal layout and is usually the safer choice for dynamic interfaces. The script below captures viewport-sized strips, removes overlapping pixels, and combines them into one PNG.

from io import BytesIO
from PIL import Image
from playwright.sync_api import sync_playwright

URL = "https://example.com"
SELECTOR = ".scrollable-panel"
OUTPUT = "panel-full.png"

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page(viewport={"width": 1440, "height": 900}, device_scale_factor=1)
    page.goto(URL, wait_until="networkidle")

    panel = page.locator(SELECTOR)
    panel.wait_for()
    panel.scroll_into_view_if_needed()

    # Read CSS-pixel dimensions and reset to the top.
    metrics = panel.evaluate("""el => ({
        width: el.clientWidth,
        height: el.clientHeight,
        scrollHeight: el.scrollHeight
    })""")
    panel.evaluate("el => el.scrollTop = 0")

    images = []
    positions = []
    offset = 0
    while True:
        panel.evaluate("(el, y) => el.scrollTop = y", offset)
        page.wait_for_timeout(100)
        positions.append(offset)
        images.append(Image.open(BytesIO(panel.screenshot(type="png"))).convert("RGB"))

        current = panel.evaluate("el => el.scrollTop")
        visible = panel.evaluate("el => el.clientHeight")
        maximum = panel.evaluate("el => el.scrollHeight - el.clientHeight")
        if current >= maximum:
            break
        offset = min(current + visible, maximum)

    # The final image can overlap the previous one. Use the actual scroll
    # positions to calculate each strip’s destination in CSS pixels.
    total_height = metrics["scrollHeight"]
    result = Image.new("RGB", (metrics["width"], total_height), "white")
    for image, y in zip(images, positions):
        result.paste(image, (0, int(y)))
    result.save(OUTPUT)
    browser.close()

Install Pillow for the stitching step:

python -m pip install pillow

The basic version above deliberately favors clarity. In production, improve it for your 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.
  • Use a fixed device_scale_factor so screenshot pixels map predictably to CSS pixels.
  • Wait for images or rows to appear after each scroll if the panel lazy-loads content.
  • Hide or remove sticky headers inside the panel before capture, otherwise they repeat in every strip.
  • Deduplicate an overlap region when the browser rounds scroll offsets or when the final strip is shorter than the viewport.
  • Restore the original scroll position and any temporary styles in a finally block if the page will be reused.

Fixed-position descendants, CSS transforms, nested scroll areas, and animations can produce seams. Disable animations with a temporary stylesheet when pixel stability matters, but verify that doing so does not alter the content you need.

Strategy 2: temporarily expand the element

For a static panel, you can make its complete scroll height visible, capture it once, and restore the original styles. This is simpler than stitching but changes layout and can affect sticky children or scripts that react to resizing.

from playwright.sync_api import sync_playwright

URL = "https://example.com"
SELECTOR = ".scrollable-panel"

with sync_playwright() as p:
    browser = p.chromium.launch()
    page = browser.new_page()
    page.goto(URL, wait_until="networkidle")
    panel = page.locator(SELECTOR)
    panel.wait_for()

    original = panel.evaluate("""el => ({
        height: el.style.height,
        maxHeight: el.style.maxHeight,
        overflow: el.style.overflow,
        width: el.getBoundingClientRect().width
    })""")
    panel.evaluate("""el => {
        el.dataset.captureOriginal = JSON.stringify({
            height: el.style.height,
            maxHeight: el.style.maxHeight,
            overflow: el.style.overflow
        });
        el.style.height = `${el.scrollHeight}px`;
        el.style.maxHeight = 'none';
        el.style.overflow = 'visible';
    }""")
    try:
        page.wait_for_timeout(100)
        panel.screenshot(path="panel-expanded.png", type="png")
    finally:
        panel.evaluate("""el => {
            const old = JSON.parse(el.dataset.captureOriginal || '{}');
            el.style.height = old.height || '';
            el.style.maxHeight = old.maxHeight || '';
            el.style.overflow = old.overflow || '';
            delete el.dataset.captureOriginal;
        }""")
    browser.close()

The unused original variable can be removed; it is shown to make the values you may need to preserve explicit. Expansion is a poor fit for virtualized lists, components whose height is controlled by JavaScript, or layouts where changing one element reflows the whole page.

Waiting for lazy content and virtualized rows

wait_until="networkidle" only describes navigation activity; it does not prove that every image, row, or deferred component is ready. Use a selector wait or a deliberate delay when the page provides a reliable signal:

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
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.
page.locator(".scrollable-panel .row").first.wait_for()
page.wait_for_timeout(500)

For lazy-loaded content, scroll incrementally and wait after each movement. For a virtualized list, record whether the visible row identifiers change as you scroll. If old rows are removed from the DOM, capture each viewport while it is rendered and stitch the resulting images; expanding the element will not recreate rows that the application virtualizes away.

Output format, scale, and memory

  • PNG: lossless and suitable for text, tables, and UI audits.
  • JPEG: smaller files for photographic content, with lossy compression.
  • WebP: often a practical size/quality compromise where your consumer supports it.
  • Device scale: a higher scale produces more physical pixels and a larger image; it does not increase the amount of scrollable content.

A very tall panel can consume substantial memory during stitching. Process strips incrementally, write temporary files, or use an image library that supports tiled workflows when the resulting bitmap is too large for available RAM. Keep the browser viewport and scale no larger than your downstream use requires.

Troubleshooting common failures

Only the visible rows appear

You used locator.screenshot() on a scrolling child. Use the scroll-and-stitch or expand strategy, and confirm that scrollHeight > clientHeight.

The screenshot is blank or too short

The selector may match a hidden template, an iframe host, or an element whose content has not loaded. Wait for a visible element, inspect its bounding box, and wait for a known child row before capturing.

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

Rows are missing after scrolling

The list may be virtualized or lazy-loaded. Scroll in smaller increments, wait for row content, and capture each rendered viewport. An expanded height alone cannot force a virtualized component to render every item.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • 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

Seams or repeated headers appear

Sticky descendants or overlapping strips are being pasted repeatedly. Hide the sticky child during capture or crop/deduplicate the overlap using the recorded scroll positions.

The final strip has the wrong height

Scroll offsets are rounded and the last viewport may extend beyond the element’s maximum scroll position. Use the browser-reported scrollTop and maximum value, then paste at that actual position rather than assuming a fixed step.

Content changes between strips

Pause animations, freeze timestamps where possible, and capture quickly. If the page updates continuously, no stitch can represent one perfectly simultaneous state; consider an application-provided export instead.

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

Text looks blurry

Increase device scale only if the consumer needs more pixels, and keep the scale constant across every strip. Scaling cannot restore detail lost by JPEG compression or a low-resolution viewport.

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 provides a website screenshot API when you need a rendered page or element image without maintaining Playwright locally. Its API can handle full-page capture, CSS-selector element capture, lazy-image loading, custom waits, cookies, headers, JavaScript, and output resizing.

Read the parameter reference in the ScreenshotNeo documentation. A one-call cURL request is:

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.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before the shot. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing result. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

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

The Free plan includes 1,000 screenshots per month without a card. Paid plans start at $5 for 3,000 shots; every feature is included on every plan. Create a free ScreenshotNeo account.

Python, Node.js, and API alternatives

Python request

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)

Node.js request

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(`${res.status} ${res.statusText}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));

These API calls are useful for a complete page or a selector configured through the service’s documented parameters. They do not replace validation of a highly interactive, virtualized nested panel; inspect the resulting image and tune waits, selectors, and loading behavior for that site.

Choosing between the two DIY methods

Situation Prefer Main trade-off
Dynamic panel with normal DOM content Scroll and stitch More code and possible seams
Static panel with simple CSS overflow Expand and capture Temporary layout changes
Virtualized or lazy list Scroll, wait, and capture each viewport Requires application-specific readiness checks
Entire document full_page=True Does not include independently scrolling children automatically

Frequently Asked Questions

Can I use full_page=True on a locator?

The documented full-page option applies to a page screenshot. A locator screenshot is clipped to the element’s rendered bounds, so nested overflow requires a custom capture strategy.

Will increasing device scale capture more hidden rows?

No. Device-pixel scale changes image resolution only. Hidden scroll content must be revealed by full-page capture, scrolling, or expansion.

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

Should I stitch screenshots for a PDF?

Only if the target is a nested scrolling element and you need its complete visual state. For a document, use a page-level PDF or full-page capture, then verify pagination and lazy content separately.

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.