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.

Use FirefoxDriver’s dedicated full-page method when you need a Selenium screenshot that extends below the viewport: call getFullPageScreenshotAs(OutputType.FILE) after loading the page. This API is exposed through Selenium’s HasFullPageScreenshot interface and implemented by FirefoxDriver. It is more explicit than the generic screenshot method, whose result can vary by browser and driver.

What “full-page” means in Selenium

A normal screenshot captures the current browser window or viewport. A full-page screenshot contains the document below the fold as well, without requiring you to manually scroll and stitch multiple images.

Selenium’s Java API has two different concepts that are easy to confuse:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
  • Explicit full-page capture: FirefoxDriver’s getFullPageScreenshotAs(OutputType<X>), inherited through HasFullPageScreenshot.
  • Generic screenshot capture: TakesScreenshot.getScreenshotAs(OutputType<X>). Its documented behavior is portable for screenshots, but it does not promise full-page output across browsers. Depending on the implementation, it may return the whole page, the current window, or only the visible frame.

Therefore, label a result as full-page only when the selected browser and API explicitly provide that behavior or you have verified the exact combination of browser, driver and Selenium version.

#1 Best Overall
HP OmniBook 3 17.3 inch Laptop PC, FHD Display, AMD Ryzen 3 30, 8 GB RAM, 512 GB SSD, AMD Radeon 610M Graphics, Windows 11 Home, Mica Silver, 17-dp0199nr
  • FULL HD IPS DISPLAY - Enjoy vibrant, crystal-clear images with 178-degree wide-viewing angles
  • AMD RYZEN 3 30 PROCESSOR - Everyday performance you can count on; Multitask, stream, game casually, and edit photos smoothly with responsive power and vibrant HDR visuals
  • ENJOY UP TO 14 HOURS AND 15 MINUTES OF BATTERY LIFE - HP Fast Charge restores battery from 0 to 50% in approximately 45 minutes
  • AMD RADEON 610M GRAPHICS - Experience smooth entertainment; Built for streaming and multitasking, enjoy realistic visuals and efficient performance for work and play
  • STORAGE AND MEMORY - 512 GB PCIe NVMe M.2 SSD offers fast speed and efficient storage; and 8 GB LPDDR5 RAM memory boosts performance with higher bandwidth

Prerequisites

  • A Java project with Selenium WebDriver and the Firefox driver available.
  • A Firefox installation compatible with the driver used by your project.
  • A URL that the test can reach.
  • A writable destination for the image file.

The example below uses Selenium’s Java types FirefoxDriver, OutputType and File. Selenium Manager or your normal driver-management arrangement must be able to start Firefox; driver startup is separate from the full-page screenshot call.

Recommended method: FirefoxDriver full-page capture

Minimal Java example

import java.io.File;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.firefox.FirefoxDriver;

public class FullPageScreenshot {
    public static void main(String[] args) {
        FirefoxDriver driver = new FirefoxDriver();
        try {
            driver.get("https://example.com");
            File screenshot = driver.getFullPageScreenshotAs(OutputType.FILE);
            System.out.println("Screenshot written to: " + screenshot.getAbsolutePath());
        } finally {
            driver.quit();
        }
    }
}

getFullPageScreenshotAs returns the requested OutputType. With OutputType.FILE, the return value is a temporary image file that you can copy into a permanent location.

Copy the temporary file to a stable path

import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.StandardCopyOption;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.firefox.FirefoxDriver;

public class SaveFullPageScreenshot {
    public static void main(String[] args) throws IOException {
        FirefoxDriver driver = new FirefoxDriver();
        try {
            driver.get("https://example.com");
            Path destination = Path.of("artifacts", "example-full-page.png");
            Files.createDirectories(destination.getParent());

            java.io.File temporary = driver.getFullPageScreenshotAs(OutputType.FILE);
            Files.copy(temporary.toPath(), destination,
                    StandardCopyOption.REPLACE_EXISTING);
            System.out.println("Saved " + destination.toAbsolutePath());
        } finally {
            driver.quit();
        }
    }
}

Keep the quit() call in a finally block so a navigation or file error does not leave the browser process running. In a larger test suite, apply the same cleanup rule through the suite’s teardown mechanism.

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

Return bytes or Base64 instead

The generic type parameter lets you request another output representation. For example, this keeps the image in memory as bytes:

byte[] imageBytes = driver.getFullPageScreenshotAs(OutputType.BYTES);

Use bytes when an uploader, test attachment system or object store accepts binary data directly. Use a file when you need a normal artifact on disk. The API call remains the same; only the requested output type changes.

Make the page capture-ready

The full-page API captures the state that exists when it runs. Your code should navigate first and wait for the content your test actually needs. A title load does not prove that images, client-rendered sections or late network responses have finished.

Rank #2
HP 14" HD Chromebook Laptop for Students, Intel Quad-Core N4120(> N4020), 4GB RAM, 64GB eMMC, WiFi, Webcam, HDMI, USB-A&C, 14 Hours Battery Life, Zoom, Chrome OS, CUE Accessories
  • Intel Celeron N4120: 4 Cores & Threads, 1.1GHz Base Clock, Up to 2.6GHz Boost Clock, 4MB Cache, Intel UHD Graphics 600. The perfect combination of performance, power consumption, and value helps your device handle multitasking smoothly and reliably with four processing cores to divide up the work.
  • 14" HD Display: 14.0-inch diagonal, HD (1366 x 768), micro-edge, anti-glare. See your digital world in a whole new way. Enjoy movies and photos with the great image quality and high-definition detail of 1 million pixels.
  • Memory & Storage: 4 GB LPDDR4x & 64 GB eMMC Storage. Adequate high-bandwidth RAM to smoothly run multiple applications and browser tabs all at once. An embedded multimedia card provides reliable flash-based storage.
  • Ports:2 x USB 3.0 Type-A,1 x USB 3.0 Type-C,1 x HDMI,1 x Headphone Jack
  • Chrome OS: Chromebook is a computer for the way the modern world works, with thousands of apps. Enjoy the seamless simplicity that comes with Google Chrome and Android apps, all integrated into one laptop. It’s fast, simple, and secure.

Wait for a document condition

import java.time.Duration;
import org.openqa.selenium.support.ui.WebDriverWait;

new WebDriverWait(driver, Duration.ofSeconds(20))
    .until(d -> ((org.openqa.selenium.JavascriptExecutor) d)
        .executeScript("return document.readyState")
        .equals("complete"));

This checks the browser’s document-ready state. It does not guarantee that every application request or lazy-loaded image is complete, so add an application-specific wait when the page needs one.

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

Wait for a visible landmark

import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.ExpectedConditions;

new WebDriverWait(driver, Duration.ofSeconds(20))
    .until(ExpectedConditions.visibilityOfElementLocated(
        By.cssSelector("main")));

File screenshot = driver.getFullPageScreenshotAs(OutputType.FILE);

Choose a selector that represents the content whose presence matters. Avoid an arbitrary fixed sleep unless the page has no observable condition you can wait for.

Why the generic TakesScreenshot call is not enough

import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;

File image = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);

This is a valid screenshot operation, but it is not a portable full-page guarantee. The documented contract describes W3C-conformant behavior according to the WebDriver specification. For non-conformant implementations, the result is browser-dependent best effort: it can be the entire page, the current window or only the visible frame portion.

Use this method when you specifically want a viewport or window screenshot, or when you have verified the exact driver behavior in your environment. Do not silently call it “full page” in a cross-browser utility.

What if the project must use Chrome?

The Selenium Java DevTools bindings include a Chrome Page screenshot command with an optional captureBeyondViewport argument. The reference commonly encountered for this route is the generated Chrome DevTools v124 binding shipped with Selenium 4.22.0. That version coupling matters: generated protocol classes and browser support can change as Selenium and Chrome advance.

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

Treat the DevTools route as a browser-specific, version-sensitive implementation rather than a universal Selenium API. Match the DevTools package to the Selenium version in your build, confirm that the browser and binding agree, and verify that the resulting image covers the complete document. If Firefox is acceptable, the explicit FirefoxDriver method is the more direct API choice.

Rank #3
Sale
AKCHART 15.6'' AI Laptop with Office 365 12GB RAM 256GB SSD Win 11 Laptops
  • Stunning 15.6" FHD IPS Display: Experience crisp 1920x1080 resolution on this 15.6 inch laptop with an IPS panel that delivers wide viewing angles and vivid colors. The narrow-bezel design maximizes screen real estate for comfortable viewing on this Win 11 laptop, whether you're studying or working.
  • Celeron J4105 Processor & 256GB SSD: Powered by a reliable Celeron J4105 processor paired with 12GB DDR4 memory and a fast 256GB M.2 SSD. This laptop computer supports SSD expansion up to 2TB and TF card expansion up to 1TB, so your storage grows with your needs. Delivers smooth multitasking for daily productivity.
  • AI-Powered Win 11 Laptop: Built-in AI features enhance your productivity with smart assistance for writing, summarizing, and task management. Pre-installed with Win 11 and includes Office 365 subscription. This student laptop is backed by 1-year warranty and 24/7 customer support.
  • All-Day 7000mAh Battery & 180° Hinge: The high-capacity 7000mAh battery keeps this laptop powered through long classes or meetings. The 180-degree lay-flat hinge lets you share your screen effortlessly during presentations. This durable laptop computer adapts to your dynamic workflow.
  • Versatile Connectivity Hub: Equipped with USB 3.2, Type-C, Mini HDMI, and 3.5mm audio jack to connect all your peripherals. Stay online anywhere with high-speed 5G WiFi and Bluetooth 4.2. This college laptop keeps you connected at home, in the library, or on the go.

Scrolling and stitching: why it is not an automatic substitute

A common workaround is to capture several viewport images while scrolling and join them in Java. That can be useful when a browser lacks a suitable full-page command, but it introduces problems that the dedicated API does not ask you to solve manually:

  • Sticky headers can appear repeatedly in every segment.
  • Lazy-loaded media may not exist until its section is scrolled into view.
  • Animations, carousels and live data can change between captures.
  • Scroll offsets and device pixel ratios can create seams or missing rows.
  • A page can change height while the stitching loop is running.

Use stitching only when its limitations are acceptable and test the resulting artifact against representative pages. The available API references do not establish a universal recipe that handles these behaviors automatically.

Common failures and fixes

Firefox will not start

Cause: Firefox, the driver, or Selenium cannot be found or are incompatible.

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

Fix: confirm that Firefox is installed, let your supported driver-management method resolve a compatible driver, and check the startup exception before diagnosing the screenshot call. A failure before driver.getFullPageScreenshotAs is a browser setup problem.

The image contains only the viewport

Cause: the code used getScreenshotAs, or the selected driver implementation does not provide full-page behavior.

Fix: use FirefoxDriver.getFullPageScreenshotAs(OutputType.FILE) with Firefox, or treat the Chrome DevTools implementation as version-specific and verify it in the exact environment.

Rank #4
HP Essential Laptop 2026, Intel CPU, 128GB Storage, Office 365, Windows 11
  • Efficient Performance for Everyday Computing: Powered by Intel N150 processor with up to 3.6 GHz Intel Turbo Boost Technology, 6 MB L3 cache, 4 cores, and 4 threads, this HP laptop delivers responsive performance for web browsing, streaming, document editing, and multitasking. Paired with 4GB LPDDR5 RAM and 128GB UFS storage, it handles daily tasks smoothly. Includes 1-year Microsoft 365 Personal subscription for Word, Excel, PowerPoint, and cloud storage to maximize your productivity.
  • 14-Inch HD Micro-Edge Display:Enjoy clear visuals on the 14-inch HD (1366 x 768) anti-glare screen with 250-nit brightness and 62.5% sRGB coverage. The micro-edge bezel delivers a 79% screen-to-body ratio in a compact design. An HP True Vision 720p HD camera with noise reduction and dual-array microphones supports clear video calls, remote work, and online learning.
  • Modern Connectivity and Wireless Technology: Stay connected with Wi-Fi 6 (2x2) for faster wireless speeds and Bluetooth 5.4 for seamless pairing with accessories. Versatile port selection includes 1 USB Type-C 10Gbps with DisplayPort 1.2 for external displays, 2 USB Type-A 5Gbps ports for peripherals, 1 HDMI 1.4b port, 1 headphone/microphone combo jack, and 1 multi-format SD media card reader. Connect monitors, transfer files quickly, and expand your workspace with ease.
  • All-Day Battery Life and Portable Design: Enjoy up to 11 hours of video playback, 7.5 hours of mixed usage, or 7.5 hours of wireless streaming on a single charge, perfect for students and professionals on the go. Weighing just 3.24 lb and measuring 12.76" x 8.86" x 0.71", this lightweight laptop fits easily in backpacks and bags. The stylish willow green top cover with matte finish and natural silver keyboard deck with vertical brushing pattern offer a modern, professional look.
  • AI-Enhanced Productivity: Access Microsoft Copilot instantly with the dedicated Copilot key for faster assistance. AI Noise Reduction filters background sounds and improves voice clarity during calls. Dual speakers provide clear audio, while the full-size natural silver keyboard and HP Imagepad support comfortable typing and navigation.

Lower-page content is missing

Cause: the application has not rendered its asynchronous or lazy-loaded content when the capture runs.

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

Fix: wait for a meaningful element or application condition before taking the screenshot. A document-ready check alone may be insufficient for client-rendered pages.

The browser remains running after an exception

Cause: cleanup was not protected.

Fix: put driver.quit() in finally (or your test framework’s guaranteed teardown). This closes the WebDriver session even when navigation, waiting or file copying fails.

The file disappears after the test

Cause: OutputType.FILE returns a temporary file.

Fix: copy it to an artifacts directory immediately, as shown above, or request bytes and persist them yourself.

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

Performance and reliability considerations

A full-page image is larger than a viewport image, so memory, disk space and transfer time increase with document dimensions and pixel density. Keep captures purposeful: use a consistent window configuration for visual tests, avoid taking screenshots repeatedly inside tight polling loops, and name artifacts with the test or URL so failures are traceable.

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.

For reliable comparisons, freeze as much page state as your application allows. Wait for the intended content, disable or account for animations where your test design permits, and capture at a known browser configuration. The cited API references establish the capture methods, not a performance or image-quality ranking, so measure resource use in your own pages if that is a release requirement.

Best Value
Sale
jumper 15.6" FHD Laptop, 12GB RAM 256GB Storage Expandable to 512GB
  • Efficient Intel Processor: Powered by Intel Celeron 5205U dual-core two-thread processor with a fixed 1.9GHz base frequency, 2MB Intel Smart Cache and advanced 14nm Comet Lake lithography. Integrated Intel UHD Graphics for 10th Gen Intel Processors delivers stable daily performance. It handles daily office tasks, web browsing, video streaming and light multitasking smoothly while featuring ultra-low power consumption for extended use.
  • Fast Response Large Storage:Equipped with 12GB high-speed RAM to accelerate program loading and enable seamless multitasking. Built-in 256GB solid-state drive provides rapid boot and application launch speeds, offering ample storage space for your documents, software, photos and videos. Run daily productivity and multimedia applications without lag or slowdowns.
  • 15.6" FHD IPS Eye-Care Display:This laptop features a 15.6-inch Full HD IPS panel with native 1920×1080 resolution and classic 16:9 widescreen ratio. Designed with slim 5mm ultra-narrow bezels, anti-glare coating and blue light filtering eye protection, it effectively reduces eye strain during long hours of studying, streaming or working, delivering vivid, immersive visual experiences. effectively reduce blue light and eye strain, bringing you immersive visual experience for watching videos and studying.
  • Pre‑Installed Windows 11: Ready to Use Comes with a genuine Windows 11 system pre‑loaded, offering a clean, intuitive interface and broad software compatibility. Open the box, power on, and you're all set for school assignments, business reports, or daily computing needs.
  • Rich Ports & Long Lasting Battery Life:Built-in 38Wh rechargeable battery and dual stereo speakers. Support Bluetooth 4.2 & 2.4G/5G dual-band WiFi for fast wireless connection. Equipped with Type-C, HDMI, 3.5mm audio jack, dual USB 3.0, Micro TF slot and DC charging port, meet your daily external device connection and office expansion needs.

Or skip the browser setup

ScreenshotNeo provides a website screenshot API and MCP server. One GET request can return a PNG, JPEG, WebP or PDF. It accepts the cookie or consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets before capture; each cleanup step can be turned off. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers.

For a full-page capture, use the API example in the ScreenshotNeo documentation:

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

Equivalent JavaScript and Python calls are useful when the screenshot is part of a service rather than a Selenium test:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://example.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
require('fs').writeFileSync('shot.webp', Buffer.from(await res.arrayBuffer()));

ScreenshotNeo also supports full-page capture with lazy images loaded, CSS-element capture, dark mode, device presets, retina scale, custom CSS and JavaScript, click-before-capture, selector waits, delays, network-idle waits, request blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, configurable caching, signed image links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Its MCP server exposes take_screenshot, get_page_info and capture_pdf for Claude, Cursor and other MCP clients.

The Free plan includes 1,000 screenshots per month with no card. Paid plans start at $5 for 3,000 shots; every feature is available on every plan. Create a free ScreenshotNeo account to try the API without adding a card.

Which approach should you choose?

Requirement Best fit Reason
Firefox is acceptable and you want a direct Selenium API FirefoxDriver.getFullPageScreenshotAs The method explicitly captures the full page.
Only a viewport image is needed TakesScreenshot.getScreenshotAs It is the generic screenshot operation; do not label it full-page without verification.
Chrome is mandatory Matching Chrome DevTools binding Use the version-sensitive Page screenshot route and verify browser/Selenium compatibility.
You need an external capture service or AI-agent workflow ScreenshotNeo Clean shots, only clean shots billed, and an MCP server; the lowest paid plan starts at $5.

Frequently Asked Questions

Does Selenium’s generic screenshot method always include the entire page?

No. Its documented result can be browser-dependent; use FirefoxDriver’s explicit full-page method when you need that contract.

Can I save the Firefox result directly as PNG?

Request the output representation your code needs, then copy the returned file or persist returned bytes to your chosen filename.

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.

Is the Chrome DevTools approach portable to every Selenium version?

No. The cited binding is specifically generated for Chrome DevTools v124 in Selenium 4.22.0, so match and verify the versions in your project.

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.