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

If a Playwright Python screenshot misses content that appears only after scrolling, scroll the relevant target or container first, wait for that content to render, then capture. Use full_page=True when you want the whole document in the image—but that option changes the capture area; it does not, by itself, trigger a site’s scroll-dependent loading.

First identify what the screenshot should include

Playwright’s page.screenshot() captures the visible viewport by default. Content below it will not appear unless you request a full-page capture or change the page’s scroll position before taking a viewport shot. A full-page image covers the scrollable document, but it is not a substitute for triggering content that the site loads in response to scrolling. Playwright’s screenshot documentation describes these capture modes.

  • Viewport: Use page.screenshot() for the currently visible area.
  • Whole document: Use page.screenshot(full_page=True) for a tall image of the full scrollable page.
  • One element: Use locator.screenshot() to capture a matched element. If it is a scrollable container, the capture includes only the content currently visible within that container.

Scroll, wait for the content, then capture

For lazy-loaded content or an infinite list, scroll a meaningful target near the missing region into view. Then wait for a condition that proves the expected content has rendered. Replace the example locator and wait condition with ones that match the page you are automating.

Synchronous Playwright

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")

    # Scrolling this lower target can trigger additional content to load.
    page.get_by_text("Footer text").scroll_into_view_if_needed()

    # Wait for a real, page-specific signal—not an arbitrary delay.
    page.get_by_text("Expected newly loaded item").wait_for()

    page.screenshot(path="page.png", full_page=True)
    browser.close()

Asynchronous Playwright

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")

        await page.get_by_text("Footer text").scroll_into_view_if_needed()
        await page.get_by_text("Expected newly loaded item").wait_for()

        await page.screenshot(path="page.png", full_page=True)
        await browser.close()

asyncio.run(main())

The wait above checks that the expected item is present. For an application that updates an existing element rather than adding a new one, wait for the relevant text, attribute, state, or other observable signal instead. There is no single post-scroll wait condition suitable for every site; Playwright’s scrolling guidance demonstrates scrolling to trigger loading but does not prescribe one universal signal.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
Elebase USB to USB C Adapter for iPhone 18 Pro Max,USBC Car Charger Adapter
  • Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
  • Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
  • Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
  • Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
  • 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.

Handle nested scrollable containers

Sometimes the document is not the thing that scrolls: a panel, feed, or modal may have its own scrollbar. Locate that actual container and move it, rather than scrolling the page and assuming the inner content changed. Playwright documents wheel scrolling and changing an element’s scrollTop for more precise control.

Scroll a container with the mouse wheel

container = page.get_by_test_id("scrolling-container")
container.hover()
page.mouse.wheel(0, 500)

# Wait for a page-specific signal that the next content is rendered.
page.get_by_text("Expected newly loaded item").wait_for()
container.screenshot(path="container.png")

Set the container’s scroll position directly

container = page.get_by_test_id("scrolling-container")
container.evaluate("e => e.scrollTop += 500")

# Wait for the state that indicates the content you need is available.
page.get_by_text("Expected newly loaded item").wait_for()
container.screenshot(path="container.png")

Adjust the amount to suit the container and the loading behavior. For async Playwright, await the locator, scrolling, waiting, and screenshot calls; the mouse wheel call is also awaited: await container.hover(), await page.mouse.wheel(0, 500), and await container.screenshot(path="container.png"). A container screenshot captures its current visible state, not every item hidden beyond its own scroll area.

Rank #2
Anker USB-C Hub, 5-in-1 USB Hub for Laptops, 4K HDMI Multiport Adapter
  • 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
  • 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
  • Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
  • 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
  • What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.

Choose the right scroll and capture combination

Goal Loading or positioning action Capture
Capture a tall document, including content loaded farther down Scroll a lower target into view; wait for the needed content to render page.screenshot(path="page.png", full_page=True)
Capture the viewport at a particular point Scroll the page to that point; wait for any needed content page.screenshot(path="viewport.png")
Capture an element in its current visible state Scroll the element or its nested container to the desired position; wait for content locator.screenshot(path="element.png")
Trigger loading within an inner panel Hover the real scroller and use the wheel, or adjust its scrollTop Capture the page or element that matches the desired output

Troubleshoot screenshots that still miss content

  • The image stops at the first screen: The default page screenshot is viewport-sized. Set full_page=True for the whole document, or scroll before taking a viewport capture.
  • The full-page image still lacks lazy-loaded items: Full-page capture changes the image extent; it does not guarantee that scrolling-triggered application content has loaded. Scroll a lower target into view, wait for the item or state you need, and check whether another scroll is needed to trigger a later loading batch.
  • The page moved, but the feed did not: The content may be inside a nested scrollable container. Identify that element and use its wheel interaction or change its scrollTop.
  • The script scrolls but captures too soon: Replace fixed sleeps with a condition tied to the page, such as waiting for the expected item to appear. An arbitrary delay is not a dependable general-purpose signal.
  • An element screenshot looks incomplete: A scrollable element screenshot shows its currently visible contents. Scroll the element itself to the required position before capturing it, or choose a full-page screenshot if the goal is the whole document.
  • The wait never completes: Confirm the locator matches the rendered content and that the scroll actually triggers the relevant loading behavior. If the application updates an existing node, wait for its updated state rather than waiting for a new element.

Use the Playwright API that fits your project

Playwright Python has synchronous and asynchronous APIs. Keep the style consistent with the surrounding project and its event-loop model. The library guide documents both forms.

If you use the Playwright pytest plugin, --full-page-screenshot controls automatic screenshots for test failures and requires screenshot capture to be enabled. It is separate from direct API calls, where you can set full_page=True on the screenshot call. See the pytest plugin reference.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #3
Sale
Anker USB C Hub, 7in1 Multi-Port USB Adapter, 4K@60Hz USBC to HDMI Splitter
  • Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
  • Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
  • Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
  • Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
  • What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.

Or skip the browser setup

If you need a hosted screenshot rather than a Playwright script, ScreenshotNeo provides a website screenshot API and MCP server. Its one-call API can return an image or PDF; see the API documentation.

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

ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and responses identify 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 with no card; paid plans start at $5 for 3,000.

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Rank #4
Sale
UGREEN USB to USB C Adapter Combo 4-Pack, 10Gbps USB C Converter Space Gray
  • Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
  • Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
  • Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
  • Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
  • Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

Does full_page=True make Playwright scroll through the page to load everything?

No. It requests a full-document image, but scroll-triggered application content may still need an explicit scroll and a page-specific wait before capture.

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

Can I use a fixed sleep after scrolling?

A fixed sleep is not a reliable general fix. Prefer a condition that confirms the content you need has rendered.

Best Value
Anker USB C Hub, 5-in-1 USBC to HDMI Splitter with 4K Display
  • 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
  • Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
  • Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
  • HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
  • What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.

How do I capture the lower part of an infinite list?

Scroll a target near the bottom into view, wait for the next expected item or another meaningful rendered-state signal, and capture after it appears.

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.