Free tools Windows power users keep installed

One-click scans. No signup required.

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

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

Short answer: Selenium’s ordinary Firefox screenshot command captures only the rendered viewport. It does not automatically include content below the fold. Use Firefox’s full-document screenshot API—get_full_page_screenshot_as_file, save_full_page_screenshot, get_full_page_screenshot_as_png, or its base64 equivalent—when you need the entire document. If that still produces a cropped image, horizontal overflow, nested scroll containers, extreme page height, headless sizing, or an incompatible Firefox/geckodriver/Selenium combination is usually responsible.

Viewport screenshots and full-page screenshots are different operations

Methods such as Selenium Python’s save_screenshot() and Java’s getScreenshotAs() ask Firefox for the current viewport. Anything below the fold, or outside the viewport horizontally, is omitted. A browser window that is 1280×800 can therefore produce an image only 1280×800 even when the document is thousands of pixels tall.

Firefox WebDriver exposes a separate full-document endpoint. In Python, the simplest file-based call is:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
from selenium import webdriver
from selenium.webdriver.firefox.options import Options

options = Options()
options.add_argument("-headless")
driver = webdriver.Firefox(options=options)
try:
    driver.get("https://example.com/long-page")
    driver.save_full_page_screenshot("page.png")
finally:
    driver.quit()

The equivalent APIs are get_full_page_screenshot_as_file(path), get_full_page_screenshot_as_png(), and get_full_page_screenshot_as_base64(). Use the ordinary viewport method only when a viewport image is what you intend to test.

A complete Python example with checks

This example records the document dimensions, waits for the page to settle, and writes a full-page PNG. The dimension values are diagnostic; they do not guarantee that every visual layer will be included.

from selenium import webdriver
from selenium.webdriver.firefox.options import Options
from selenium.webdriver.support.ui import WebDriverWait

URL = "https://example.com/long-page"
options = Options()
options.add_argument("-headless")
# Set a predictable viewport, not just an outer window size.
options.add_argument("--width=1365")
options.add_argument("--height=900")

driver = webdriver.Firefox(options=options)
try:
    driver.get(URL)
    WebDriverWait(driver, 30).until(
        lambda d: d.execute_script("return document.readyState") == "complete"
    )

    metrics = driver.execute_script("""
        const e = document.documentElement;
        const b = document.body;
        return {
          documentWidth: Math.max(e.scrollWidth, b ? b.scrollWidth : 0),
          documentHeight: Math.max(e.scrollHeight, b ? b.scrollHeight : 0),
          viewportWidth: e.clientWidth,
          viewportHeight: e.clientHeight,
          bodyHeight: b ? b.scrollHeight : 0
        };
    """)
    print(metrics)
    driver.save_full_page_screenshot("full-page.png")
finally:
    driver.quit()

For lazy-loaded pages, scrolling through the document before capture can trigger content that is loaded only near the viewport. That workaround is site-specific: it can change layout, activate animations, or alter analytics. If a page has a reliable “load all” control, click it and wait for the resulting network activity before taking the screenshot.

Why Firefox still returns a partial image

1. The viewport API is still being called

Check the actual line that writes the file. A helper function may hide save_screenshot() even though the surrounding code mentions full-page capture. In Java, Firefox’s full-page support is exposed through Firefox-specific driver functionality rather than the generic viewport screenshot call. Verify that your Selenium binding and driver expose the full-document method you selected.

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

2. Horizontal scrolling can fall back to viewport capture

Firefox’s full-page implementation has documented limitations with horizontally scrolling documents. Mozilla geckodriver issue 1580 reported that the full endpoint took a viewport-only image for a horizontal-scroll document, while vertical scrolling worked in that environment. A page with a wide table, a fixed-width canvas, or CSS such as overflow-x: auto can trigger this behavior.

Inspect both the document and the element that actually scrolls:

scroll_info = driver.execute_script("""
const all = [...document.querySelectorAll('*')];
const candidates = all.filter(el => {
  const s = getComputedStyle(el);
  return (s.overflowX === 'auto' || s.overflowX === 'scroll' ||
          s.overflowY === 'auto' || s.overflowY === 'scroll') &&
         (el.scrollWidth > el.clientWidth || el.scrollHeight > el.clientHeight);
});
return {
  document: {
    scrollWidth: document.documentElement.scrollWidth,
    scrollHeight: document.documentElement.scrollHeight
  },
  containers: candidates.slice(0, 20).map(el => ({
    tag: el.tagName, id: el.id, className: el.className,
    scrollWidth: el.scrollWidth, clientWidth: el.clientWidth,
    scrollHeight: el.scrollHeight, clientHeight: el.clientHeight
  }))
};
""")
print(scroll_info)

If the important content is inside an inner scrolling panel, “full page” is ambiguous: the document may be short while the panel is tall. Capture that element separately, temporarily remove its fixed height, or scroll and stitch panel screenshots. A normal page with vertical document flow is the best control case.

3. The document is exceptionally tall

Large surfaces stress browser bitmap limits and driver memory. In geckodriver issue 1306, an author reported viewport-only behavior and JavaScript errors for a 1000×32766-pixel capture using Firefox 59.0.2, geckodriver 0.21.0, and Selenium 3.12.1. That is an issue-specific observation, not a universal maximum, but it shows why a successful call on a short page does not prove that an enormous page will work.

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

For very tall pages, reduce unnecessary content, capture logical sections after scrolling, and stitch those images in an image-processing step. Keep overlap between sections so text and sticky elements can be aligned. Treat a single giant PNG as a best effort rather than a reliable archival format.

4. Headless window dimensions are not the PNG dimensions

Headless Firefox can report an outer window size that differs from the actual content viewport. Mozilla geckodriver issue 1744 documents a requested 1024×768 headless window producing a 1024×694 PNG under Firefox 78.0.2, geckodriver 0.26.0, and Selenium 3.141.0 (issue details). Browser chrome and viewport calculations explain why the height can be smaller.

Measure document.documentElement.clientWidth and clientHeight, then inspect the actual PNG dimensions with your image library. Do not use get_window_size() alone as a screenshot-size assertion. In CI, set the viewport explicitly and compare the resulting image dimensions on the same browser and driver versions.

5. An old or mismatched browser stack is involved

Firefox, geckodriver, and Selenium are a compatibility set. Mozilla describes geckodriver as “not yet feature complete” and maintains compatibility information. Record all three versions in every failing test, then move to a current mutually compatible trio before investigating application-specific layout. Reproducing on an older combination can send you after a bug that has already been fixed—or hide a regression in a newer one.

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

A diagnostic sequence that isolates the cause

  1. Log versions. Record the Selenium package, Firefox binary, and geckodriver versions from the same run.
  2. Identify the API. Confirm that the code invokes Firefox’s full-document method, not save_screenshot() or a wrapper around it.
  3. Measure layout. Print document scrollWidth/scrollHeight, body dimensions, and viewport clientWidth/clientHeight.
  4. Test a plain vertical page. If a simple long document succeeds, the application likely has overflow, fixed overlays, lazy loading, canvas, or nested scrolling that needs isolation.
  5. Check the real scroller. Find elements whose scroll dimensions exceed their client dimensions. Decide whether you need a document shot or an element shot.
  6. Compare the file itself. Read the PNG width and height; do not infer them from the requested outer window size.
  7. Reduce the case. Disable animations, remove nonessential widgets, and try a shorter version of the page. If the short version works, capture sections or simplify the layout.

Handling common page features

Sticky and fixed elements

Headers fixed to the viewport can appear repeatedly or cover content in a stitched workflow. A native full-page capture may render them according to Firefox’s implementation. For deterministic visual tests, hide or restyle fixed elements with test-only CSS, but document that the result no longer represents the production layering.

Lazy images and infinite scrolling

A full-document call cannot include content that the page has not created or loaded. Wait for a known selector, scroll in increments, and verify that the document height stops changing. Infinite feeds have no stable “full page”; define a maximum item count or capture a bounded section.

Canvas, video, and animations

Canvas pixels can change between runs, and video frames are inherently time-dependent. Pause animations where possible, wait for a known frame, and expect small rendering differences across operating systems. A screenshot that has the correct height can still be visually incomplete.

When to capture sections instead

Section capture is appropriate when a document exceeds practical bitmap limits, contains a horizontally scrolling application shell, or needs independently reviewable panels. Scroll an element or the document, wait for layout stabilization, take viewport screenshots, and stitch them with a known overlap. Remove or mask sticky headers during stitching to avoid duplicated bands. Keep the original viewport dimensions and scroll offsets in metadata so a reviewer can reproduce the result.

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

Or skip the browser setup

ScreenshotNeo provides a single HTTP request for a PNG, JPEG, WebP, or PDF and can request full-page capture with lazy images loaded. It also supports element selectors, custom viewport and device presets, retina scale, waits for selectors, delays or network idle, custom CSS and JavaScript, hiding selectors, blocking requests and resource types, cookies and headers, timezone and geolocation, transparent backgrounds, resizing, caching, signed links, asynchronous jobs, bulk capture of up to 100 URLs per call, and PDF page controls. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients.

Use the API documentation at https://screenshotneo.com/docs/ for the complete parameter list. A full-page WebP request looks like this:

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

Python:

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js:

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

Before capture, ScreenshotNeo accepts cookie and consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers identify the page verdict and billing status. The free plan includes 1,000 shots each month without a card; paid plans start at $5 for 3,000 shots. Create a free ScreenshotNeo account.

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

Troubleshooting by symptom

Only the visible fold is present

Replace the viewport method with the Firefox full-document method. Confirm that the saved file is produced by that call and test a simple vertically scrolling page.

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

The right side is missing

Inspect document and inner-container horizontal scroll values. A horizontally scrolling document is a known geckodriver limitation in some versions; redesign the test capture, target the scrolling element, or stitch sections.

The image is shorter than requested

Compare PNG dimensions with clientWidth/clientHeight, especially in headless mode. Set the viewport explicitly and avoid treating outer window dimensions as content dimensions.

The call throws a JavaScript or memory error

Reduce page height and complexity, update the Firefox/geckodriver/Selenium trio, and capture sections. A very large bitmap can fail even when ordinary viewport screenshots work.

Images or sections are absent

Wait for the relevant selector or network activity, scroll to trigger lazy loading, and verify that the document height has stabilized before capture.

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.

FAQ

Does maximizing the Firefox window create a full-page screenshot?

No. Maximizing changes the viewport size; it does not include content below the fold. Use the full-document API.

Is a full-page screenshot guaranteed to include an inner scroll panel?

No. The document and an element with its own scrollbar are different capture targets. Measure which element owns the content and capture or expand that element deliberately.

Should I treat 1000×32766 pixels as Firefox’s hard limit?

No. That size was reported in one geckodriver issue with a specific old software combination. It is evidence of a practical failure mode, not a universal limit.

Why should CI store browser versions with screenshots?

Rendering and full-page behavior depend on the Firefox, geckodriver, and Selenium combination. Version metadata lets you distinguish an application layout change from a driver or browser change.

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

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.