DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk7 min

How to Screenshot an Infinite-Scroll Page with Playwright

Playwright’s fullPage option captures what is loaded, not what an infinite feed has yet to fetch. Trigger scrolling, wait for the right signal, and then capture to a defined limit.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Short answer: scroll the page—or the nested element that owns the feed—until the content you want has loaded, wait for a site-specific signal that it has rendered, and then capture it with page.screenshot({ fullPage: true }). The fullPage option captures the page’s current scrollable extent; it does not, by itself, make an infinite feed fetch every remaining item.

Why full-page screenshots do not load an infinite feed

Playwright’s fullPage: true option captures the full scrollable page as it exists when the screenshot is taken. It changes the screenshot’s extent, not the application’s loading behavior. A site that fetches more records when a visitor scrolls still needs to be scrolled before those records can appear in the document.

As an Amazon Associate I earn from qualifying purchases.

Playwright’s scrolling guide specifically describes scrolling as a way to force an “infinite list” to load more elements. The practical sequence is therefore: navigate, trigger loading by scrolling, wait for the page to render the wanted content, and capture. See the Playwright scrolling guide and the Page screenshot API.

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

Choose a stopping rule before you scroll

An endless feed has no finite “everything” state. Decide what the screenshot should include before automating it. Useful limits include a particular item, a maximum item count, a maximum scroll depth, or a known end marker. Without a limit, a script may keep loading content indefinitely or produce an image too large to use.

#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
  • Capture the full loaded document: scroll until the chosen limit is reached, then use fullPage: true.
  • Capture the visible viewport: omit fullPage; this is useful for a sequence of screenshots taken as the script scrolls.
  • Capture a region or element: use the screenshot API’s clip option or take a locator screenshot. An element screenshot of a scrollable container may show only the container’s currently visible content.

Scroll the main page and wait for new content

The following Node.js example shows the order of operations. Replace the URL, selectors, and item-count condition with values from the target site. The count-based wait is an example of a site-specific signal, not a universal selector or condition.

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

(async () => {
  const browser = await chromium.launch();
  const page = await browser.newPage();

  try {
    await page.goto('https://example.com/feed', {
      waitUntil: 'domcontentloaded'
    });

    const items = page.locator('.feed-item');
    const initialCount = await items.count();
    const targetCount = initialCount + 20;

    // A site-specific trigger: bring the current feed end into view.
    await items.last().scrollIntoViewIfNeeded();

    // Wait for the target site's feed to add the desired number of items.
    await page.waitForFunction(
      expected => document.querySelectorAll('.feed-item').length >= expected,
      targetCount,
      { timeout: 15000 }
    );

    await page.screenshot({ path: 'feed.png', fullPage: true });
  } finally {
    await browser.close();
  }
})();

This example makes one scroll-trigger attempt. If the page loads in batches and you need more than one batch, put the scroll-and-wait pair in a loop and stop when your chosen item count or other limit is met. The loop’s exact signal depends on the site. A fixed sleep can be useful as a small settling delay, but it is not a dependable substitute for observing that the requested content appeared.

Pick a loading signal the page actually exposes

  • New item or changed count: wait for the feed length to increase or for a known item to become visible.
  • Loading indicator: wait for the site’s spinner or “loading” element to disappear after the request.
  • Known sentinel or end marker: scroll that element into view, then wait for the next batch or the end marker to change.

If the page does not expose a stable loading indicator, a count change or a known new item is usually more meaningful than waiting an arbitrary number of milliseconds. Make the timeout long enough for the site’s expected response, and handle a timeout as a failed or incomplete capture rather than silently saving a partial image.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
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

Scroll a nested feed container instead

Some pages keep the browser window stationary while a panel, modal, or feed element scrolls internally. In that case, scrolling the page may not trigger loading. Use the container that owns the scroll position.

Use the mouse wheel over the container

const feed = page.locator('.feed-scroll-area');
await feed.hover();
await page.mouse.wheel(0, 800);

Repeat the wheel action as needed, checking the site-specific loading signal after each action. Playwright’s scrolling guidance also documents using a locator’s evaluate() method to change the selected element’s scrollTop.

Set the container scroll position

const feed = page.locator('.feed-scroll-area');
await feed.evaluate(element => {
  element.scrollTop = element.scrollHeight;
});

Changing scrollTop can move directly to the current bottom, but some applications only fetch after particular scroll events or when a sentinel intersects the viewport. If this does not trigger loading, use wheel scrolling over the container or scroll the site’s actual sentinel into view. A full-page screenshot captures the document’s scrollable extent; it does not automatically expand an internally scrollable panel into a complete list.

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.

Capture the desired output

Full loaded document

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

Use this after the desired records are present. The resulting capture covers the page’s scrollable document, not content that the site has not loaded yet.

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

Viewport sequence

await page.screenshot({ path: 'viewport.png' });

Omitting fullPage captures the current visible viewport. This is appropriate when you want separate images at successive scroll positions rather than one tall file.

Region or element

The Page screenshot API supports a rectangular clip region; a locator can also be screenshotted directly. Choose these when only a specific area matters. For a scrolling element, check whether the screenshot shows only its visible portion or the full content you intended.

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

Make visual-test screenshots repeatable

For Playwright Test visual assertions, toHaveScreenshot() waits for two consecutive page screenshots to produce the same result before comparing the last one with the expectation. That stabilizes the comparison step, but it does not replace the need to load the intended feed items first. Keep the baseline and test environment consistent: rendering can vary with operating system, browser version, settings, hardware, power source, and headless mode. See the Playwright visual comparisons guide and screenshot assertion API.

Troubleshoot missing or incomplete content

  • The screenshot ends after the first batch: fullPage did not trigger further fetching. Scroll to the feed end, wait for a new batch, and repeat until your target limit is reached.
  • Scrolling the page has no effect: identify whether the feed is inside a nested scrolling container, then direct wheel input or a scrollTop change to that element.
  • The script times out waiting for items: verify the selector matches the rendered records, confirm the scroll action reaches the feed’s trigger point, and check that the target count is possible. If the application uses a different loading signal, wait for that instead.
  • The image is still missing the last items: wait for the site’s observable render condition after the last scroll. A request completing is not always the same as the new content being rendered.
  • The capture grows without bound: the feed has no natural endpoint for this task. Enforce an explicit item, depth, or other stopping limit.
  • Visual tests differ between runs or machines: keep the browser and machine environment consistent and ensure the same content has loaded before taking the assertion screenshot.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Performance, reliability, and output size

Each additional scroll-and-wait cycle gives the application another opportunity to fetch and render content. Limit the capture to the material the task needs rather than trying to exhaust a genuinely unbounded feed. Very tall full-page images can also be awkward to store, review, or compare; a sequence of viewport captures or a targeted region may better match the job.

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.

For reliable automation, treat loading and capture as separate phases: first verify that the desired items exist, then take the screenshot. If the loading condition fails, report or record the capture as incomplete instead of treating a partial image as a successful full-feed result.

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.

Or skip the browser setup

ScreenshotNeo can return a screenshot or PDF from one GET request. For example, capture a page after it is in its desired state:

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

See the ScreenshotNeo API documentation for request options. ScreenshotNeo accepts cookie or consent banners before capture and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each of those steps can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server offers take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.

Create a free ScreenshotNeo account to try 1,000 screenshots a month with no card.

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

Frequently Asked Questions

Does Playwright’s full-page option scroll an infinite list for me?

No. It captures the scrollable document available at screenshot time; the application must first be prompted to load more items.

Can Playwright capture every item in a truly infinite feed?

No finite capture can include an unbounded feed. Set a target item, maximum depth, or another stopping rule.

Should I use a fixed delay after scrolling?

A delay alone is not a universal loading signal. Prefer waiting for a site-specific item, count change, loading indicator, or other observable condition.

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.

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.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Outdated Drivers Are Slowing You DownFree scan - exact matches
PC Slower Than It Used to Be?Free scan - under a minute

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.