Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
In Java, capture with Selenium’s TakesScreenshot interface:
File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
InternetExplorerDriver implements TakesScreenshot. However, “visible page area” is not an absolute guarantee with the legacy IE driver: for a non-W3C-conformant driver, Selenium documents a best-effort order that may return the entire page, current window, visible portion of the current frame, or the display containing the browser. Copy the returned temporary file if the artifact must survive the JVM.
What the Java call actually captures
The shortest working form is:
File screenshot = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE);
The call asks the active driver for a screenshot and returns it in the representation named by OutputType. It does not crop the image in Java after the fact. With a W3C-conformant driver, Selenium follows the WebDriver screenshot behavior. With a non-W3C-conformant driver, Selenium’s documented fallback preference is:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
- the entire page;
- the current browser window;
- the visible portion of the current frame; or
- the entire display containing the browser.
Therefore, treat “visible page area” as the requested outcome, not a promise that every Internet Explorer session will produce a viewport-only bitmap. If an exact viewport crop is mandatory, inspect the resulting image and apply your own image-processing crop, or use a capture service that defines viewport behavior explicitly.
#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
Prerequisites and the current Internet Explorer situation
Browser and operating system
The Selenium IE Driver Server documentation describes InternetExplorerDriver as Windows-only and reports testing with Internet Explorer 11 on Windows 10. It requires the standalone IEDriverServer executable. Put that executable on PATH, or configure its location through the Selenium binding you use.
Required IE settings
- Set Protected Mode to the same state for every Internet Explorer security zone.
- Set browser zoom to 100 percent.
- Use a Windows machine that can launch the driver and browser interactively or in the desktop configuration required by your test runner.
These settings are driver prerequisites, not screenshot options. A session can fail before navigation if they are inconsistent.
IE versus Edge IE mode
Selenium ended official support for the Internet Explorer browser in June 2022. The IE driver continues to support Microsoft Edge running in IE compatibility mode. Confirm which browser your deployment actually launches before diagnosing an image that differs from a legacy IE run.
Selenium’s installation guidance says Selenium Manager downloads an appropriate driver as of Selenium 4.6, while the IE Driver Server setup documentation still describes downloading and placing its standalone executable on PATH. Follow the instructions for the binding and environment in your project; do not assume automatic management is available for every IE configuration.
Complete Java example that saves a durable PNG
This example navigates, captures, creates an artifact directory, and copies the temporary Selenium file to a permanent path:
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.nio.file.StandardCopyOption;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.ie.InternetExplorerDriver;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
public class IeScreenshot {
public static void main(String[] args) throws Exception {
WebDriver driver = new InternetExplorerDriver();
try {
driver.get("https://example.com");
File temporary = ((TakesScreenshot) driver)
.getScreenshotAs(OutputType.FILE);
Path destination = Paths.get("artifacts", "visible-page.png");
Files.createDirectories(destination.getParent());
Files.copy(temporary.toPath(), destination,
StandardCopyOption.REPLACE_EXISTING);
} finally {
driver.quit();
}
}
}
OutputType.FILE is temporary and is deleted when the JVM exits. The Files.copy call is what turns it into a durable test artifact. Copy it before the process ends and before cleanup code removes the browser session.
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
Capture the frame you intend to inspect
If the page uses frames, switch to the target frame before calling getScreenshotAs, then switch back if later test steps address the top-level document:
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Clear out junk files and repair common Windows errors3Fix the driver behind crashes, sound loss and screen glitchesdriver.switchTo().frame("content-frame");
File frameShot = ((TakesScreenshot) driver)
.getScreenshotAs(OutputType.FILE);
driver.switchTo().defaultContent();
The driver may still return a broader image because of the fallback behavior described above, but selecting the frame makes the current browsing context unambiguous.
Choosing FILE, BYTES, or BASE64
| Representation | Use it when | Persistence note |
|---|---|---|
OutputType.FILE |
You want Selenium to materialize a PNG file for copying or attaching to a test report. | The file is temporary; copy it to a durable location before JVM exit. |
OutputType.BYTES |
You will upload, hash, or process the PNG in memory. | Write the byte array to storage or send it to your artifact system yourself. |
OutputType.BASE64 |
An API, log format, or JSON document requires Base64 text. | Decode and persist it if a binary image is ultimately required. |
Bytes example
byte[] png = ((TakesScreenshot) driver)
.getScreenshotAs(OutputType.BYTES);
Files.write(Paths.get("artifacts", "visible-page.png"), png);
Base64 example
String encoded = ((TakesScreenshot) driver)
.getScreenshotAs(OutputType.BASE64);
byte[] png = java.util.Base64.getDecoder().decode(encoded);
Files.write(Paths.get("artifacts", "visible-page.png"), png);
Making the capture representative
Navigate and wait for the state you need
Take the screenshot only after the URL, frame, and application state are correct. If the page renders content asynchronously, wait using the synchronization strategy already used by your test suite rather than assuming navigation completion means every visual element is ready.
Control the browser window deliberately
Viewport dimensions affect what “visible” means. Set the window size through WebDriver before capture when your test requires repeatable dimensions, and keep IE zoom at 100 percent as required by the driver setup. Do not compare images from different window sizes as if they were equivalent viewports.
Capture after interactions
Clicks, form entry, navigation, and frame changes must happen before the screenshot call. The screenshot reflects the current browser state; it does not replay earlier commands.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Python equivalent
Selenium’s Python InternetExplorerDriver exposes three direct methods:
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.
get_screenshot_as_file(path)saves a PNG of the current window;get_screenshot_as_png()returns PNG bytes;get_screenshot_as_base64()returns Base64 text.
from selenium import webdriver
from selenium.webdriver.ie.service import Service
# Configure Service with your IEDriverServer path when it is not on PATH.
driver = webdriver.Ie()
try:
driver.get("https://example.com")
if not driver.get_screenshot_as_file("artifacts/visible-page.png"):
raise RuntimeError("Selenium could not write the screenshot")
finally:
driver.quit()
The file method writes the PNG directly to the path you supply. The bytes and Base64 methods are useful when your test framework stores artifacts through an API instead of a filesystem.
Troubleshooting InternetExplorerDriver screenshots
Session fails before the page opens
Check that the standalone IEDriverServer executable is discoverable and compatible with the environment. Then verify that Protected Mode has the same setting in every zone and that zoom is exactly 100 percent. A mismatch commonly prevents a stable session rather than producing a merely imperfect image.
The image is a full page or full window instead of the viewport
This is consistent with Selenium’s documented best-effort behavior for a non-W3C-conformant driver. The fallback can prefer the entire page or current window before the visible frame. If you need a strict crop, post-process the image using the viewport dimensions known to your test, or use a service that captures a defined viewport.
The screenshot disappears after the test process exits
OutputType.FILE returns a temporary file. Copy it with Files.copy before JVM shutdown, or use BYTES and write the data directly to your artifact store.
The wrong document appears in the image
Confirm the active browsing context. A frame capture requires switchTo().frame(...); return to the top-level document with switchTo().defaultContent() before taking a top-level screenshot.
Images differ between machines
Compare Windows version, browser mode, window dimensions, zoom, display scaling, fonts, and page state. Legacy IE and Edge IE compatibility mode are not interchangeable rendering environments, so record which one the driver launched.
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 page is blank or incomplete
Verify that navigation reached the expected URL and that your synchronization condition waits for the content you need. A screenshot records whatever has rendered at the instant of the call; it cannot repair a failed load or a page blocked by the environment.
Free tools Windows power users keep installed
One-click scans. No signup required.
Reliability, speed, and artifact handling
- Use one capture point per diagnostic state. Extra screenshots increase artifact volume without helping if they are taken before the relevant interaction.
- Keep the original PNG. PNG preserves text and UI edges for visual debugging; convert only when a downstream system requires another format.
- Name artifacts deterministically. Include test name, browser mode, and a sequence number in the destination path so parallel jobs do not overwrite one another.
- Close the driver in a
finallyblock. This releases the browser even when capture or file copying fails. - Separate capture failure from copy failure. A successful screenshot call can still be followed by a permissions, directory, or disk-space error while saving the artifact.
Local Selenium capture has no separate screenshot-service request charge; your practical costs are the Windows test host, browser session, storage, and runtime. A remote capture API can remove that browser setup, but it changes where rendering and authentication occur.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo is a website screenshot API and MCP server. One GET request can return PNG, JPEG, WebP, or PDF without installing InternetExplorerDriver. The API accepts a URL and can also handle full-page capture with lazy images loaded, CSS-selector element capture, dark mode, 12 device presets or a custom viewport, retina scale, PDF paper size/margins/landscape/page ranges, custom CSS and JavaScript, pre-capture clicks, hidden selectors, waits for a selector/delay/network idle, blocked ads/trackers/requests/resource types, custom headers/cookies/user agent/Authorization, timezone and geolocation, transparent backgrounds, image resizing, chosen cache TTL, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API, and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration.
Cookie and consent banners are accepted like a visitor and more than 60 known consent platforms, newsletter popups, and chat widgets are removed before the shot; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and each response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.
For a direct capture, see the ScreenshotNeo documentation and run:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
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)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; yearly billing provides two months free, and every feature is included on every plan. Create a free ScreenshotNeo account to try the capture without configuring an IE browser.
FAQ
Does changing FILE to BYTES change the screenshot itself?
No. The output type changes how Selenium returns the same capture: temporary file, byte array, or Base64 text.
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.
Can an IE-driver screenshot be guaranteed to be viewport-only?
Not for every legacy, non-W3C-conformant implementation. Selenium documents broader fallback results, so enforce a crop yourself when exact viewport bounds are a hard requirement.
What should a CI pipeline archive?
Archive a copied PNG (or bytes written to durable storage), not the temporary path returned by OutputType.FILE.
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 →Frequently Asked Questions
Does changing FILE to BYTES change the screenshot itself?
No. It changes only the return representation; the capture request is the same.
Can an IE-driver screenshot be guaranteed to be viewport-only?
No. Legacy non-W3C drivers may return a page or window image according to Selenium’s documented fallback order.
What should a CI pipeline archive?
Copy the temporary file to durable storage, or write the BYTES result directly; do not rely on the temporary path after JVM shutdown.
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.
Recommended Free Tools

