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

A normal Selenium screenshot usually captures the visible viewport, not the entire page. If you use Firefox, Selenium documents a full-document screenshot method for its Firefox driver. With Chrome or another browser, verify that your specific driver and Selenium binding support a full-page method; otherwise, capture viewport-sized sections and stitch them together. Scrolling before calling an ordinary screenshot does not by itself create one continuous full-page image.

Choose the method that matches your browser

First decide whether you need the complete document in one image or only a screenshot of the current viewport after scrolling. Those are different capture scopes: a standard driver screenshot records what is currently visible, while a full-page operation captures the scrollable document. Selenium’s standard screenshot operations and Firefox’s full-page functionality are documented separately, so do not assume that every browser driver exposes the same full-page API. See Selenium’s WebDriver browser-window documentation and its Firefox-specific functionality documentation.

Situation Practical option Important qualification
You use Selenium with Firefox Use the Firefox full-page screenshot API in your language binding. Confirm that the method is present in the installed Selenium version and that the Firefox driver setup is compatible.
You use Chrome or another browser Check the current documentation for your exact browser, driver, Selenium version, and binding. If no supported full-page call is available, capture and stitch viewport sections. The Selenium references cited here do not establish a universal full-page method for Chrome and every other browser.
You can change automation frameworks Consider Playwright’s page screenshot option for a full-page capture. This is Playwright functionality, not a Selenium flag.

Capture a full page with Selenium and Firefox

Selenium’s Python Firefox API documents get_full_page_screenshot_as_file(...), which saves a full-document screenshot as a PNG file. The Python API reference for Selenium 4.49.0 also describes methods that return PNG bytes or base64 data: Firefox WebDriver Python API. Use the file method when you want a straightforward saved image.

Python example

Install Selenium in the Python environment that will run the script, make Firefox available, and configure a compatible Firefox WebDriver setup. The example opens a page, waits for the document’s initial load event, and asks Firefox’s Selenium driver to save the full-page PNG.

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

url = "https://example.com"
output_file = "full-page.png"

driver = webdriver.Firefox()
try:
    driver.get(url)
    WebDriverWait(driver, 30).until(
        lambda d: d.execute_script("return document.readyState") == "complete"
    )
    saved = driver.get_full_page_screenshot_as_file(output_file)
    if not saved:
        raise RuntimeError(f"Could not save screenshot to {output_file}")
    print(f"Saved full-page screenshot: {output_file}")
finally:
    driver.quit()

The readiness check waits for the browser’s document load state; it does not guarantee that a single-page application has finished rendering, that lazy-loaded images have appeared, or that every asynchronous request has completed. If the page builds content after its initial load, wait for a page-specific element or condition before capturing. A fixed delay can be used when necessary, but a condition tied to the content you need is generally clearer and less likely to wait longer than required.

Java API availability

Selenium’s Java API documents the Firefox full-page screenshot interface HasFullPageScreenshot, which FirefoxDriver implements. Check the API reference and your installed Selenium version before wiring it into a Java project: Selenium Java HasFullPageScreenshot. The existence of this Firefox-specific interface should not be read as evidence that the same method is available on every driver.

For Chrome and other Selenium browsers

Do not assume that a regular call such as driver.save_screenshot("page.png") will include content outside the viewport. It saves a screenshot through the active driver, and the exact capture scope depends on the browser and driver capabilities. The Selenium documentation cited here does not establish one dedicated full-page call shared by Chrome and all other browsers.

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.
  1. Identify the browser, browser-driver version, Selenium version, and programming-language binding used by your project.
  2. Check the current official Selenium documentation for that exact combination and for a browser-specific full-page screenshot capability.
  3. If a supported full-page operation is documented, use that documented API and validate the output against a page that extends below the initial viewport.
  4. If not, use viewport captures and stitch them, or use a framework with a documented full-page option if changing frameworks is acceptable.

Keep this check specific: support in Firefox does not prove support in Chrome, and a method available in one language binding does not establish availability in another. Browser and driver APIs can change, so verify against the versions actually installed in your environment.

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

Fallback: capture viewport sections and stitch them

When your Selenium setup has no verified full-page method, a fallback is to scroll through the page, save successive viewport screenshots, and combine them into one image. This is a custom workflow rather than a universal Selenium feature. The official references cited here do not provide a single validated stitching implementation that works across languages, drivers, and page designs.

At a high level, a stitching workflow needs to:

  1. Measure the viewport dimensions and the page’s scrollable height.
  2. Move the page to a known vertical position and allow its content to settle.
  3. Save the visible viewport image at that position.
  4. Repeat at later positions until the document has been covered, accounting for the final partial viewport.
  5. Join the images in order, checking overlaps and alignment rather than assuming every capture begins exactly where the previous one ends.

Stitching is most dependable when the page is stable as you scroll. Fixed or sticky headers can appear in every segment; dynamic content can move between captures; lazy-loaded elements may appear late; and careless segment positioning can create gaps or duplicate strips. Review the joined image at the seams and compare it with the actual page. If a faithful, continuous image matters, a stitching result that has not been visually checked should not be treated as proof that the page was captured accurately.

Alternative framework: Playwright full-page capture

If switching frameworks is practical, Playwright documents a direct full-page screenshot option. Its API describes fullPage: true as taking “a screenshot of the full scrollable page, instead of the currently visible viewport.” In Python, the equivalent option is full_page=True. This is a Playwright API, not a Selenium setting; consult the Playwright Page API reference for the current syntax and behavior of your binding.

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 screenshot rather than a Selenium browser workflow, ScreenshotNeo provides a one-request screenshot API. Its output can be PNG, JPEG, WebP, or PDF, and its API documentation is at ScreenshotNeo docs. This cURL example requests a WebP screenshot of the example page:

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

ScreenshotNeo removes cookie and consent banners, newsletter popups, and chat widgets before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents use screenshot tools, and the Free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000. For details, visit ScreenshotNeo. Sign up for free: 1,000 screenshots a month, no card required.

Troubleshooting capture problems

The image contains only the visible viewport

You likely called the standard screenshot method rather than a full-page API. On Firefox, check that you are using the Firefox-specific full-page method. On another browser, confirm support for your exact driver and binding; if there is no documented full-page method, use a stitching workflow or a different framework.

The Firefox full-page method is missing

Check the Selenium version installed in the environment running the script, the language binding, and that the active driver is actually Firefox’s. Consult the Firefox API reference for the method available to that binding. Do not assume a method in a different binding or a newer version exists in your installation.

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

The screenshot is blank or content is missing

The initial document load may have finished before the page’s application content or images were ready. Wait for a specific element or page condition that represents the content you need. For lazy-loaded content, determine whether the page requires scrolling to trigger it; a full-document API and a scroll-through workflow may not trigger content in identical ways.

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

The stitched image has repeated headers, gaps, or misaligned content

Inspect the capture positions and page behavior. Sticky elements may repeat, the page may change while scrolling, and overlap or rounding in segment positions can produce seams. Adjust the capture plan for the page and inspect the final composite; the cited official sources do not define a universally reliable stitching algorithm.

The capture works locally but not in another environment

Compare the browser, driver, Selenium version, binding, and headless or hosted execution configuration between environments. A browser-specific feature should be tested in the actual deployment setup, not inferred from a different browser or a developer workstation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

FAQ

Does scrolling first make Selenium’s normal screenshot full-page?

No. Scrolling changes which part of the page is visible; a normal viewport screenshot captures that visible area. To produce one image covering the full document, use a supported full-page operation or capture and stitch segments.

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.

Can I use Selenium’s Firefox API with ChromeDriver?

No: the documented full-page interface discussed here is Firefox-specific. Use APIs documented for the browser and driver you are actually running.

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

Is Playwright’s full-page option part of Selenium?

No. It belongs to Playwright’s page screenshot API and requires using Playwright rather than setting a Selenium option.

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.