Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →For Firefox, use Selenium’s built-in full-document screenshot methods: get_full_page_screenshot_as_file() or save_full_page_screenshot(). For Chrome or Chromium, Selenium’s ordinary screenshot call captures the current window, so use the browser-specific Chrome DevTools Protocol (CDP) when you need content below the viewport. Scroll-and-stitch libraries are a fallback, not a portable shortcut. The right choice depends chiefly on which browser you must support.
Which method should you choose?
| Method | Browser | How it captures a full page | Main trade-off |
|---|---|---|---|
| ScreenshotNeo | Website screenshot API; no local Selenium browser setup | One HTTP request returns an image or PDF | Requires an API key and network request; see ScreenshotNeo. |
| Selenium Firefox full-document API | Firefox | Uses documented WebDriver methods to save a full-document PNG or return PNG data | Direct route when Firefox is acceptable. |
| Chrome DevTools Protocol (CDP) | Chrome and Chromium | Uses the Page domain screenshot command with beyond-viewport capture enabled | Browser-specific protocol code that must be checked against deployed versions. |
| Scroll and stitch | Potentially useful when direct browser routes do not fit | Captures viewport slices while scrolling, then combines them | Must handle lazy-loaded content and repeated sticky elements; implementation details vary. |
“Full page” means including document content below the visible viewport. Enlarging the browser window does not by itself establish that the entire document was captured. Selenium’s ordinary screenshot APIs describe a current-window or current-browsing-context capture, not a portable full-document capture. See Selenium’s screenshot documentation.
Use Firefox’s built-in full-page screenshot API
The Selenium Python Firefox API documents full-document screenshot methods, including file, PNG-bytes, and base64 output. For a file, use a .png path and check the returned Boolean: False indicates an I/O error and True indicates success. The official API reference is for Selenium 4.50.0; confirm the documentation for the version installed in your environment at Selenium’s Firefox WebDriver API.
Runnable Python example
Install Selenium and make a compatible Firefox browser and driver available in the runtime. This example opens a page, waits for document readiness, writes a full-page PNG, and closes the browser even if capture fails.
#1 Best Overall
from pathlib import Path
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
url = "https://example.com"
out = Path("full-page.png")
options = Options()
options.add_argument("-headless")
driver = webdriver.Firefox(options=options)
try:
driver.get(url)
# This checks document readiness, not completion of every app-specific
# request or lazy-loaded image.
driver.execute_async_script("""
const done = arguments[0];
if (document.readyState === "complete") return done();
window.addEventListener("load", () => done(), { once: true });
""")
ok = driver.get_full_page_screenshot_as_file(str(out))
if not ok:
raise OSError(f"Could not write screenshot to {out}")
print(f"Saved {out}")
finally:
driver.quit()
The Firefox API also provides save_full_page_screenshot(path), get_full_page_screenshot_as_png(), and get_full_page_screenshot_as_base64(). Use the PNG-returning methods when the next step needs bytes or an encoded payload rather than a file. Do not substitute driver.save_screenshot() for these methods when the requirement is full-document output.
Capture a full page in Chrome or Chromium with CDP
For Chromium, the documented direction is to use CDP’s Page domain: obtain document dimensions with Page.getLayoutMetrics, then call Page.captureScreenshot with beyond-viewport capture enabled. This is not a browser-neutral Selenium feature. CDP is tied to Chromium and its protocol details can change; the official protocol page is tip-of-tree documentation, so check its parameter shapes against the Chrome and Selenium versions actually deployed: Chrome DevTools Protocol Page domain.
Rank #2
Implementation pattern, not a version-independent drop-in
Selenium exposes CDP commands differently across browser and Selenium releases. Treat the following as the sequence to implement, not copy-paste code guaranteed for every version: retrieve layout metrics, select the document content width and height, and invoke Page.captureScreenshot with a clip matching those dimensions and captureBeyondViewport enabled. Decode the returned image data and write it as PNG. Before release, verify the command names, response shape, and parameter support against the protocol served by your installed browser.
- Pin or record the Chrome/Chromium and Selenium versions used in production.
- Enable or access the Page CDP domain through the mechanism supported by that Selenium release.
- Call
Page.getLayoutMetricsand use the document-content dimensions appropriate to the installed protocol. - Call
Page.captureScreenshotwith a clip covering that content and beyond-viewport capture enabled. - Decode the response’s image data, save the PNG, and inspect it on long and dynamic pages in the actual deployment.
A full-page image may be very tall. Large dimensions can increase memory use and output size; choose PDF or split output if the consuming system cannot handle a single tall bitmap. No comparative performance benchmark is established here.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
When scroll-and-stitch is a fallback
A stitching approach scrolls through the page, captures viewport-sized images, and combines the slices. It can be useful when the direct Firefox or Chromium-specific routes are unavailable or unsuitable, but it adds work that a browser’s document capture does not: deciding scroll positions, managing overlap, composing slices, and checking for visual discontinuities. A secondary overview of screenshot approaches discusses these caveats at BrowserStack’s Selenium screenshot guide.
- Lazy-loaded material: scrolling may be needed to trigger images or content that do not load until they approach the viewport. Wait for the required content before taking its slice.
- Sticky headers and fixed elements: these may appear in every slice. Hide them, account for the overlap, or otherwise handle repetition in the stitching logic.
- Changing layouts: dynamic content can shift between captures and create gaps or duplicated regions. Use stable page state where possible and inspect the resulting image.
Prepare the page before capture
The capture method only records what the browser has rendered. A load event or document.readyState === "complete" does not prove that a single-page application has finished fetching data, animations have settled, or every lazy image has loaded. Wait for a page-specific selector or condition that represents the content you need. If the target material is lazy-loaded, scroll it into view or otherwise trigger loading before capture, then wait for it to render.
Validate representative pages in the same browser, headless or headed mode, and deployment environment as the production run. The API documentation establishes available methods, but it does not guarantee how every dynamic site will render in your particular setup.
Troubleshooting
- The screenshot ends at the viewport: check that you did not use
save_screenshot()or another ordinary current-window capture. Use Firefox’s full-document method or the Chromium CDP route. - Firefox returns
False: the file method reports an I/O error. Check that the parent directory exists, the process can write there, and the target path is a PNG filename. - Images or content are missing: wait for the site-specific content condition, trigger lazy loading, and capture only after the material has rendered.
- Repeated bars or seams appear: this is a common stitching issue when fixed or sticky elements recur across slices or the page shifts while scrolling. Adjust the stitch logic or use a direct full-document browser method.
- CDP command or parameter is rejected: verify the Chrome/Chromium and Selenium versions and consult the protocol exposed by that browser. Do not assume tip-of-tree protocol parameters are supported unchanged in every deployed release.
- A capture succeeds but looks incomplete: inspect a representative output from the real runtime. A successful file write confirms output was saved, not that the page reached the desired rendered state.
Or skip the browser setup
ScreenshotNeo can return a website screenshot with one GET request. Its cleanup can accept cookie or consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. It also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
Recommended Free Tools
For example, this Python request saves a WebP screenshot. Replace the URL with the page to capture and provide your API key:
Best Value
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)
See the ScreenshotNeo API documentation for request options and response details. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Sign up for 1,000 free screenshots a month, with no card required.
Frequently Asked Questions
Can Selenium’s save_screenshot() capture a whole webpage?
No. Selenium documents the ordinary screenshot command as capturing the current window or browsing context; use a full-document Firefox method or a Chromium-specific CDP implementation for below-viewport content.
Does Firefox’s full-page file method save JPEG?
The documented full-document file methods write PNG output. Use a PNG filename; the API also exposes PNG bytes and base64 methods.
Is the Chrome CDP approach portable to Firefox?
No. CDP is Chromium-specific. For Firefox, use the Firefox WebDriver full-document screenshot API.
Quick Recap
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.




