October DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsClean PCRecommendedOne scan can reveal what keeps slowing WindowsLook for cleanup and repair opportunities.Run ScanOctober DealsAmazon USDeal season is back - check today's better picksAmazon US: current deals, useful picks and tech finds.See Picks×
Skip to content
World desk6 min

Puppeteer: How to Screenshot a Table That Loads Rows on Scroll

Scroll the table’s actual container, verify the desired rows are present, then capture the element or full page. Learn how to handle nested scrolling, lazy loading, and virtualized tables.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Scroll the table’s actual scrollable area first, wait until the rows you need are present, then take the screenshot. fullPage: true enlarges the capture area; it does not itself trigger scroll-based loading.

Load the rows before taking the screenshot

The exact selectors and completion condition depend on the target page. First identify whether the page itself scrolls or the table sits inside a nested element with its own scrollbar. Scroll that area in increments, and after each step check for an observable signal that more data arrived: a particular row, a larger row count, the expected total, or a loading indicator disappearing.

As an Amazon Associate I earn from qualifying purchases.

  1. Navigate to the page and wait for the table and, if applicable, its scroll container.
  2. Scroll the element that actually owns the scroll behavior. Puppeteer’s locator .scroll() generates mouse-wheel scrolling for the selected element; for a page-level scroller, scroll the page instead.
  3. Wait for a page-specific condition with page.waitForFunction(). Use an expected row count or known last row when available; network idle alone does not establish that the table is complete.
  4. Repeat until the completion condition is met, with a maximum iteration or time limit. If no rows arrive, fail clearly rather than looping indefinitely.
  5. Capture the table element for a table-only image, or the page with fullPage: true for a page-wide image.

Here is an illustrative pattern for a nested scroll container and a table whose rows accumulate in the DOM. Replace the selectors and completion logic with the target page’s real DOM and known expected row count.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const table = await page.waitForSelector('table');
const scrollContainer = await page.waitForSelector('.table-scroll-container');
const expectedRows = 100; // Set this to a target-specific completion condition.

let complete = false;
for (let i = 0; i < 100; i++) {
  const count = await page.$$eval('table tbody tr', rows => rows.length);
  if (count >= expectedRows) {
    complete = true;
    break;
  }

  await scrollContainer.evaluate(el => {
    el.scrollTop += Math.max(200, el.clientHeight * 0.8);
  });

  try {
    await page.waitForFunction(
      (selector, oldCount) =>
        document.querySelectorAll(`${selector} tbody tr`).length > oldCount,
      { timeout: 5000 },
      'table',
      count,
    );
  } catch (error) {
    // No new rows appeared within the wait period. Continue only within
    // the bounded loop; production code should record or handle this case.
  }
}

if (!complete) {
  throw new Error(`Expected at least ${expectedRows} rows, but the table did not reach that count`);
}

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

This sample assumes rows accumulate, and its count threshold is only an example. If the table uses a different completion signal, wait for that instead. For a page-level scroll, use a page scroll action rather than changing a nested container’s scrollTop.

#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

Choose the right screenshot scope

Capture just the table

Use ElementHandle.screenshot() when the output should contain only the table:

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

Puppeteer scrolls an element into view if it is hidden when taking an element screenshot. That does not fetch rows that the application has not loaded.

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

Capture the whole page

Use Page.screenshot() with fullPage: true when you need the full page in the image:

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

Puppeteer documents fullPage as requesting a full-page screenshot; it defaults to false. The capture option controls image extent, not the application’s loading sequence. See the Page screenshot options and ElementHandle screenshot documentation.

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.

Nested scrolling, lazy loading, and virtualized tables

Nested scroll container

If the table has its own scrollbar, scrolling window may not trigger its load handler. Inspect the table and its ancestors in DevTools, identify the element whose content scrolls, and target that element. Puppeteer’s locator .scroll() emits mouse-wheel scrolling for the selected element; direct scrollTop changes are another option when the page responds to them.

Lazy-loaded or appended rows

Wait for the relevant content to change after scrolling. A row count that increases is useful only if rows remain in the DOM; a known last row or explicit total is stronger when available. Puppeteer’s page.waitForFunction() waits until a predicate in the page context becomes truthy. A short timeout can make the loop responsive, but a fixed sleep by itself cannot prove all required rows have loaded.

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

Virtualized rows

A virtualized table may keep only a moving window of rows in the DOM, removing earlier rows as later ones appear. In that case, a full-page screenshot or a single element screenshot may show only the currently rendered window, not the entire dataset. Check whether the application provides an export or print view. Otherwise, capture the rendered rows in sections and combine them if a single image is essential; confirm the output includes the intended records rather than assuming off-DOM rows are captured.

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

Waiting reliably and avoiding hangs

  • Prefer content conditions: wait for a known row, target count, or loading indicator to disappear.
  • Treat network idle as a supplement: Puppeteer’s waitForNetworkIdle() waits for network idleness, not for a particular table state.
  • Bound the work: set a maximum number of scrolls and an overall timeout. Report the last observed row count if the target is not reached.
  • Handle no-progress cases deliberately: if a wait times out, decide whether to retry, inspect a loading/error state, or stop. Do not silently swallow every timeout in production.
  • Check image readability: a very tall full-page image can make dense rows hard to inspect; a table-only image or sectional captures may be more useful.

Common problems and fixes

  • The screenshot has only the initially visible rows: fullPage did not trigger the site’s loading behavior. Scroll first and wait for the needed rows.
  • Scrolling the page loads nothing: the table may use a nested scroll container. Scroll that element instead.
  • The loop never finishes: the expected count may be wrong, the page may stop loading, or rows may be virtualized. Add a firm iteration/time limit and use a target-specific end marker.
  • Network idle arrives but rows are missing: network silence is not proof of table completeness. Wait for the row or state that matters.
  • The element screenshot is cropped to the rendered rows: the application may have removed older rows from the DOM. Use an export/print view or capture sections if all records must appear.
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 screenshot from one GET request. For example, save a WebP capture of a table page at its URL:

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://example.com/table -o shot.webp

See the ScreenshotNeo API documentation for request parameters. ScreenshotNeo accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, failed loads, timeouts, and cache hits are not billed, and response headers identify the page verdict and billing status. Its MCP server includes screenshot, page-info, and PDF capture tools for AI agents. The free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000 shots. These features do not change a site’s own lazy-loading or virtualization behavior, so verify that the capture contains the rows you need.

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

Sources

Puppeteer’s current documentation identifies version 25.12.0 for the relevant APIs. The target page’s DOM and load behavior determine which selectors and completion condition work; the example above is illustrative, not tested against a particular table.

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

Frequently Asked Questions

Does `fullPage: true` automatically load every row in a scrolling table?

No. It changes the screenshot extent; scroll the relevant area and verify the rows first.

Can Puppeteer screenshot an element that is off-screen?

Yes. `ElementHandle.screenshot()` scrolls the element into view if it is hidden, but it does not cause the application to fetch missing rows.

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.

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
Crashes, No Sound, or Screen Glitches?Free driver scan
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.