Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →For a full-document screenshot, use Selenium’s documented full-page API with Firefox, or Chrome’s browser-specific DevTools Protocol. WebDriver’s ordinary screenshot command captures the current browsing context; it is not a portable promise to capture the entire document. Choose the route that matches your browser and Selenium binding, then check the image against the page you need to capture.
Choose the capture method for your browser
| Browser and route | What it captures | Output |
|---|---|---|
| Selenium with Firefox | Selenium documents full-document screenshot methods for Firefox. | PNG file or PNG data, depending on the method. |
| Chrome DevTools Protocol (CDP) | Page.captureScreenshot can capture beyond the viewport when captureBeyondViewport is enabled. This is a Chrome-specific protocol capability, not a general WebDriver guarantee. |
Base64-encoded image data. |
| Ordinary WebDriver screenshot | The current browsing context, as shown in Selenium’s standard screenshot documentation; do not assume it covers the full document. | Depends on the binding’s screenshot method. |
The Selenium Python Firefox API reference identifies version 4.50.0. The CDP Page reference is the live “tot” protocol documentation, whose fields may evolve. Check the documentation for your installed Selenium and browser versions before relying on a particular integration.
As an Amazon Associate I earn from qualifying purchases.
Capture a full-page screenshot with Selenium and Firefox
Selenium’s Python Firefox API provides save_full_page_screenshot(filename) and get_full_page_screenshot_as_png(). The file method expects a .png filename. These examples use Selenium’s Firefox driver; install Selenium and make Firefox available in your environment before running them.
Recommended Free Tools
Save directly to a PNG file
from selenium import webdriver
options = webdriver.FirefoxOptions()
# Uncomment to run Firefox without a visible window:
# options.add_argument("-headless")
driver = webdriver.Firefox(options=options)
try:
driver.get("https://example.com")
driver.save_full_page_screenshot("page.png")
finally:
driver.quit()
Get PNG bytes and write them yourself
from selenium import webdriver
options = webdriver.FirefoxOptions()
# options.add_argument("-headless")
driver = webdriver.Firefox(options=options)
try:
driver.get("https://example.com")
png_bytes = driver.get_full_page_screenshot_as_png()
with open("page.png", "wb") as image_file:
image_file.write(png_bytes)
finally:
driver.quit()
Use the file method when you want Selenium to save the PNG. Use the bytes method when your program needs to choose how or where to store the image. Selenium’s Java HasFullPageScreenshot interface also documents full-page capture and lists FirefoxDriver as an implementing class; treat this as the documented Firefox path, not a cross-browser WebDriver feature.
#1 Best Overall
Capture beyond the viewport in Chrome with CDP
Chrome’s DevTools Protocol has a separate screenshot route: the Page.captureScreenshot command. Its captureBeyondViewport option defaults to false; set it to true when you need capture beyond the viewport. The command returns base64-encoded image data. The protocol reference defines the capability, but the exact Selenium call for sending CDP commands depends on the Selenium binding and environment you use. Do not substitute an assumed universal WebDriver method.
Page.captureScreenshot({
"captureBeyondViewport": true
})
Use the CDP integration supported by your installed Chrome and Selenium setup to send that command, then decode the returned base64 image data and save it in the format your workflow requires. Consult the Chrome DevTools Protocol Page reference for the current command parameters and response shape.
Rank #2
Prepare the page and verify the image
A full-page API does not guarantee a perfect rendering of every site. Before capture, wait for the page content you need to appear and use a consistent browser window or device configuration. Inspect the resulting image, especially when the target has dynamic content or very large dimensions.
- Lazy-loaded images: The API references establish capture capability, not a guarantee that every lazy image has loaded. Check the output and wait for relevant content before taking the screenshot.
- Animations or changing content: A page that changes while being captured may not produce a consistent image. Verify the captured result for the target site.
- Fixed-position elements: Headers, banners, or other fixed elements may not appear as expected in a long capture. Inspect for repeated or misplaced elements.
- Frames and very long pages: The cited documentation does not establish fidelity guarantees for cross-origin frames or extreme document dimensions. Test these cases rather than assuming they are supported perfectly.
When a custom scrolling workaround is necessary
If neither documented native route is available in your browser and binding, scrolling the page in viewport-sized sections and stitching the images is a custom workaround, not an official Selenium full-page screenshot method. It can introduce seams or overlaps, duplicate fixed elements, and capture inconsistent content if the page changes while scrolling. Use it only when those trade-offs are acceptable, and inspect the stitched output carefully.
Rank #3
Troubleshooting
- The image stops at the viewport: You may be using ordinary WebDriver screenshot behavior, which is not a portable full-document feature. Use Selenium’s Firefox full-page API or Chrome CDP with
captureBeyondViewportenabled. - The Firefox file method rejects the filename: The documented API expects a
.pngfilename. Use a PNG path, or use the bytes-returning method and handle the output yourself. - The Chrome capture does not extend beyond the viewport: Check that the CDP command includes
captureBeyondViewport: true; the documented default isfalse. Also confirm that your Selenium/CDP integration is sending the command to Chrome. - The screenshot is missing or inconsistently renders content: Wait for the relevant page content to load and inspect whether it is lazy-loaded, animated, or changing during capture. The APIs do not guarantee fidelity for those behaviors.
- The screenshot contains odd fixed elements or seams: This can occur with custom scrolling and stitching. A fixed element may be repeated, and changing content may no longer line up across sections.
Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server. A single GET request can return an image or PDF; the API documentation is at screenshotneo.com/docs.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo accepts cookie and 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, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status. Its MCP server includes take_screenshot, get_page_info, and capture_pdf for AI agents using Claude, Cursor, or another MCP client. The free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots.
Sign up for 1,000 free screenshots a month with no card.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Quick Recap
Best Value
Rank #4
Official references
- Selenium WebDriver: Windows and screenshots
- Selenium Python Firefox WebDriver API
- Selenium Java Firefox full-page screenshot interface
- Chrome DevTools Protocol: Page domain
- Firefox screenshot documentation
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.




