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

driver.save_screenshot() captures the current browser window, not an unlimited page. To include every row of a dynamic table, first confirm the rows have loaded, then capture the table element if it fits or take overlapping screenshots while scrolling through the correct container. Check that the final row appears in the saved image or images.

Choose a capture method for your table

  • The full table fits on screen: capture its element with element.screenshot().
  • The table is taller than the viewport: save overlapping viewport screenshots while scrolling through it.
  • Scrolling loads additional rows: scroll in increments and wait for the row count or content to change before continuing.
  • The table uses pagination or virtual scrolling: a single screenshot cannot show rows that are not currently rendered. The page may require navigating pages or capturing each visible segment.

First determine whether the document or an inner table container has the scrollbar. Scrolling the wrong element may move the page without revealing more table rows.

Wait for the table and inspect its rows

Use a wait tied to the table or its loading indicator rather than assuming a fixed delay is enough. The selector and completion condition depend on the site. For example, if the page exposes table rows as tr elements, you can wait for an expected count or for a loading indicator to disappear. Do not treat an arbitrary row count as proof of completion unless you know the expected count for that page.

Selenium’s JavaScript execution can scroll the document or bring an element into view. A basic set of primitives is:

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.
# Scroll the document to its bottom
 driver.execute_script("window.scrollTo(0, document.body.scrollHeight)")

# Bring a located table or row into view
 driver.execute_script("arguments[0].scrollIntoView(true);", element)

# Save the current browser window
driver.save_screenshot("screenshot.png")

# Save one element, such as a table
element.screenshot("table.png")

These are building blocks, not a complete solution for every dynamic table. A lazy-loaded or virtualized table can need repeated scrolling, explicit waits, and multiple captures. Selenium documents current-window and element screenshots; the cited documentation does not promise a browser-independent way to capture an arbitrarily tall dynamic table as one image.

Capture a table that fits in one image

If all rows are present and the table element’s dimensions are manageable, locate the table and save its element screenshot. Replace the example selector with one that matches the page:

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.
from selenium.webdriver.common.by import By

# Assumes driver is already open and the table has loaded.
table = driver.find_element(By.CSS_SELECTOR, "table")
table.screenshot("table.png")

An element screenshot is suitable only when the element can be captured as rendered. If the table is clipped by a fixed-height, scrollable container, first scroll that container through the rows or use segmented captures instead.

Capture a taller table in overlapping segments

For a table taller than the browser viewport, take a screenshot at each scroll position. The overlap helps avoid cutting through row boundaries; inspect the results afterward for gaps and repeated rows. This example scrolls the document, so adapt it if the table has its own scrollbar:

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.
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait

# Assumes driver is already open and the table is present.
table = driver.find_element(By.CSS_SELECTOR, "table")
wait = WebDriverWait(driver, 10)

# Start near the table; the exact positioning depends on the page.
driver.execute_script("arguments[0].scrollIntoView(true);", table)

# Capture successive document positions with overlap.
step = int(driver.execute_script("return window.innerHeight * 0.8"))
position = 0
index = 1
while True:
    driver.execute_script("window.scrollTo(0, arguments[0]);", position)
    # Replace with a site-specific condition if scrolling triggers loading.
    wait.until(lambda d: d.execute_script("return window.scrollY") == position)
    driver.save_screenshot(f"table-{index:03}.png")

    current = driver.execute_script("return window.scrollY")
    height = driver.execute_script("return document.documentElement.scrollHeight")
    if current + driver.execute_script("return window.innerHeight") >= height:
        break

    position = min(position + step, height)
    index += 1

This example follows the document’s height and end position. It does not detect whether the table’s own contents have finished loading, and page layouts can change height as more rows arrive. For an inner scrolling container, locate that container and read or change its scrollTop and scrollHeight instead. If scrolling fetches additional rows, wait for a row-count or content change after each movement, then verify the site-specific end condition.

Verify that every row is represented

  • Compare the row count in the page with the known expected count, if the site provides one.
  • Confirm the final expected row is visible in the last screenshot.
  • Check adjacent images for missing or duplicated rows, using the overlap to match their boundaries.
  • For virtualized tables, remember that rows outside the rendered region may not exist in the DOM at the same time; scroll and capture each segment rather than relying on a single element screenshot.

The loading condition and the definition of “last row” are page-specific. Selenium provides the scrolling and screenshot primitives, but it cannot infer a site’s pagination, lazy-loading, or virtual-scroll completion rules.

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

Troubleshooting missing or incomplete screenshots

The screenshot contains only the visible part of the page

driver.save_screenshot() saves the current browser window. Scroll and capture overlapping segments, or use an element screenshot when the table fits and is fully rendered.

Scrolling does not reveal more rows

Check whether the table is inside a separately scrollable element. Scroll that container rather than the document. If the table uses pagination, move through its pages; if it virtualizes rows, capture successive rendered segments.

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

The last screenshot is missing newly loaded rows

A scroll to the bottom can happen before a site’s asynchronous loading finishes. Wait for a site-specific signal, such as a changed row count or a loading indicator disappearing, after each scroll. A fixed sleep may be unreliable when load time varies.

Rows are clipped or repeated between images

Use smaller scroll increments so successive viewport captures overlap, then inspect the row boundaries. The overlap should make it possible to identify where one segment ends and the next begins.

An element screenshot omits part of the table

Check whether the element is constrained by a scrollable container or whether all rows are rendered. Element capture does not make unloaded or unrendered rows appear; scroll through the container and capture segments as needed.

Or skip the browser setup

ScreenshotNeo offers a screenshot API and MCP server. Its one-call API can capture a URL as an image or PDF; it is for web-page capture, not a replacement for Selenium logic that must inspect a particular table’s rows or scroll a page-specific container.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

See the ScreenshotNeo API documentation for request options. ScreenshotNeo removes cookie banners, newsletter popups, and chat widgets before a capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots a month without a card. Paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.

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.