Short answer: Selenium WebDriver 3 can request a screenshot, but its standard screenshot API does not guarantee a full-document image on every browser and driver. In Java, use the Selenium 3.141.59 TakesScreenshot interface, save the returned file, and then verify that the image actually contains the complete page. If the result is only the viewport, use a mechanism documented for your exact browser-driver pair or a scroll-and-stitch workaround.
What Selenium 3 actually guarantees
The Selenium 3 Java API exposes TakesScreenshot.getScreenshotAs(OutputType). The WebDriver documentation describes the result as a best-effort screenshot whose extent depends on the browser and driver implementation. Its preference order is an entire page, the current window, the visible portion of the current frame, and finally the complete display. That order is a target, not a portable promise that every call captures the full document.
Consequently, a successful call can still produce a viewport-sized image. Treat the file as unverified until you open it or inspect its dimensions. The browser, driver, operating system, page layout, and Selenium binding all matter.
Prerequisites and version boundaries
- Use a Selenium 3 project and a browser-driver pair that still supports it. Selenium 3.141.59 is the relevant Java API generation for this procedure.
- Install the matching browser driver and keep its version compatible with the browser.
- Know that the exact behavior is implementation-dependent; do not assume Chrome, Firefox, and other drivers return identical image sizes.
- Allow the page’s meaningful content to load before capturing. Lazy images, client-rendered sections, animations, and late API responses can otherwise be missing.
Newer Selenium documentation and current Firefox bindings include full-document conveniences, but those references describe newer, version-specific APIs. They should not be used as evidence that every Selenium 3 installation exposes the same methods.
Recommended Free Tools
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Java: capture and save a screenshot
This example uses the Selenium 3 Java interface and writes the returned image to a predictable path. Replace the URL and output path for your project.
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
public class FullPageAttempt {
public static void main(String[] args) throws IOException {
WebDriver driver = new ChromeDriver();
try {
driver.get("https://example.com");
// Add an explicit wait here for your page's real readiness condition.
File temporary = ((TakesScreenshot) driver)
.getScreenshotAs(OutputType.FILE);
Path destination = Path.of("artifacts", "page.png");
Files.createDirectories(destination.getParent());
Files.copy(temporary.toPath(), destination,
StandardCopyOption.REPLACE_EXISTING);
System.out.println("Saved screenshot to " + destination.toAbsolutePath());
} finally {
driver.quit();
}
}
}
OutputType.FILE asks the binding for a file result; the copy operation moves it to your chosen location. The cast to TakesScreenshot is the Selenium 3 Java pattern. The API itself does not tell your test that the image is full-page, so validation is a separate step.
Make the capture deterministic
Wait for content, not an arbitrary sleep
Navigate first, then wait for a page-specific condition: a results container, a heading, a known number of cards, or a loading indicator disappearing. A fixed delay can be useful for a known animation, but it is not a reliable substitute for a readiness condition. For lazy-loaded pages, scroll through the document before the screenshot and allow newly requested images to finish. This is practical automation guidance; the screenshot interface does not itself load deferred content.
Freeze sources of visual change
Disable or finish carousels, blinking cursors, video, and transitions where possible. If a page changes between runs, compare a stable test state rather than treating every pixel difference as a Selenium failure.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Check the output
Open the saved image and compare its height with the page you intended to capture. A viewport-height image is evidence that your driver returned the visible window rather than the whole document. Also check that the bottom-most content, footer, and lazy images are present.
When the result is not full-page
Use a driver-specific method
First consult documentation for the exact Selenium 3 binding, browser, and driver combination. Some implementations offer browser-specific full-document behavior; others only return the current viewport. A method documented for Selenium 4 or a current Firefox binding cannot be assumed to work unchanged in Selenium 3.
Scroll and stitch as a fallback
An explicit workaround is to capture overlapping viewport segments while scrolling and combine them with an image-processing library. This can work when no native full-page operation exists, but it is not a universal Selenium guarantee. Fixed headers, sticky elements, responsive breakpoints, scroll-linked effects, and changing content can produce seams or duplicate pixels. Hide or compensate for sticky elements, use a consistent viewport, and validate the assembled image at several scroll positions.
Do not present a stitched image as equivalent to a native document capture without checking it. Pages with cross-origin frames, canvas content, video, or continuously loading feeds need special handling.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Common failures and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
ClassCastException when requesting the image |
The driver object is not being used through the screenshot interface. | Use a WebDriver implementation that supports screenshots and cast it to TakesScreenshot as shown. Confirm the Selenium 3 binding and driver are the ones actually loaded at runtime. |
| File exists but is only viewport-sized | The driver returned the current window or visible frame. | Check the exact driver documentation, then use a supported browser-specific method or a carefully validated scroll-and-stitch process. |
| Footer or lower sections are missing | Full-page behavior is not supported, or lazy content was never triggered. | Inspect image dimensions, scroll to trigger deferred loading, wait for requests to finish, and retest. Do not infer full-page support from a successful HTTP or file operation. |
| Images are blank or partly loaded | The screenshot was taken before network-driven rendering completed. | Wait for a page-specific ready state and verify the image elements or their loaded state before capture. |
| Screenshot differs between runs | Animation, rotating content, ads, time-dependent data, or a changing viewport. | Stabilize the page, set a fixed window size, disable motion where practical, and compare only after the same readiness condition. |
| Stitched output has seams | Sticky elements or layout changes during scrolling. | Remove or account for fixed elements, use overlap between segments, and inspect joins manually or with image checks. |
Performance, reliability, and storage considerations
A native screenshot request is usually cheaper and simpler than stitching because it avoids multiple scrolls and image merges. Its reliability, however, is bounded by the driver implementation. Stitching increases browser interactions, memory use, processing time, and opportunities for page state to change.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Capture only after the page is ready, and write artifacts outside temporary directories when they must survive the test process. Use unique filenames in parallel runs so one test cannot overwrite another. Close the driver in a finally block even when the screenshot or file copy fails. Retain the browser, driver, Selenium version, viewport dimensions, and output dimensions with the artifact; those details make a later mismatch diagnosable.
For visual regression, standardize the operating system, browser version, device scale factor, fonts, viewport, timezone, locale, and test data. Selenium’s screenshot call does not normalize those variables for you.
Or skip the browser setup
When the objective is simply a clean page image rather than browser interaction, ScreenshotNeo provides a one-request screenshot API. It accepts the consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and each response identifies the page verdict and billing status in X-Page-Verdict and X-Billed headers. It also has an MCP server so Claude, Cursor, and other MCP clients can call screenshot tools.
See the ScreenshotNeo documentation for request options. A basic cURL call is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
The equivalent Python request is:
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)
And in 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}`);
ScreenshotNeo supports full-page captures with lazy images loaded, CSS-selector element captures, device presets and custom viewports, retina scale, dark mode, PDFs, custom CSS and JavaScript, clicks before capture, waits, request blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, configurable caching, signed links, asynchronous jobs, bulk capture, usage reporting, and an OpenAPI specification. Its parameter names are compatible with those used by many screenshot APIs, which can simplify migration.
Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan, and yearly billing gives two months free. Create a free ScreenshotNeo account to try the 1,000 monthly shots without adding a card.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Choosing the right approach
- Use Selenium 3 when the screenshot is part of an interaction-driven browser test and you need the same session, cookies, or JavaScript state.
- Use a driver-specific full-page facility when your exact browser-driver combination documents one and your output validation confirms it.
- Use scroll-and-stitch only when you can control page motion and accept the additional complexity.
- Use an API when you need repeatable remote captures, clean consent-free images, bulk jobs, PDFs, or AI-agent access without maintaining browser drivers.
FAQ
Does getScreenshotAs always capture the entire HTML document?
No. Selenium 3 describes screenshot extent as dependent on the browser and driver, so the returned file must be checked.
Can Selenium 4 documentation be copied directly into a Selenium 3 project?
Not safely. Newer APIs and current Firefox methods are version-specific; verify availability in the Selenium 3 binding and driver you run.
Why should I record image dimensions?
Dimensions provide an objective signal that distinguishes a document-sized result from a viewport capture and help diagnose changes between environments.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
Frequently Asked Questions
Does getScreenshotAs always capture the entire HTML document?
No. Selenium 3 describes screenshot extent as dependent on the browser and driver, so the returned file must be checked.
Can Selenium 4 documentation be copied directly into a Selenium 3 project?
Not safely. Newer APIs and current Firefox methods are version-specific; verify availability in the Selenium 3 binding and driver you run.
Why should I record image dimensions?
Dimensions provide an objective signal that distinguishes a document-sized result from a viewport capture and help diagnose changes between environments.
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.

