Free tools Windows power users keep installed
One-click scans. No signup required.
The basic Selenium screenshot is one method call: in Python, run driver.save_screenshot("screenshot.png") while the WebDriver session is open. The method captures the current window, writes a PNG, and returns False if Selenium cannot save the file. Use a known, writable path and check that return value so a missing test artifact becomes a visible failure instead of a silent omission.
Save a screenshot in Python
This complete example creates its artifact directory, opens a page, saves a PNG, checks the documented Boolean result, and always closes the browser:
from pathlib import Path
from selenium import webdriver
output = Path("artifacts") / "page.png"
output.parent.mkdir(parents=True, exist_ok=True)
driver = webdriver.Chrome()
try:
driver.get("https://example.com")
saved = driver.save_screenshot(str(output))
if not saved:
raise OSError(f"Could not save screenshot to {output}")
finally:
driver.quit()
save_screenshot(filename) is documented as saving the current window to a PNG image file. Use a .png suffix, and prefer an absolute path when a CI job, test runner, or report generator must find the file in a predictable location. The parent directory must already exist or be created by your test code, and the process needs write permission.
Choose the output representation
A file is convenient for CI artifacts; bytes and Base64 are better when the next step uploads or embeds the image without an intermediate file.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems#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
| API | Result | Use it when |
|---|---|---|
save_screenshot(path) |
PNG file; Boolean success result | You need a report or downloadable artifact |
get_screenshot_as_png() |
PNG bytes | An image library, object store, or HTTP client accepts binary data |
get_screenshot_as_base64() |
Base64-encoded string | You are embedding the image in HTML or a data-URL workflow |
png_bytes = driver.get_screenshot_as_png()
base64_image = driver.get_screenshot_as_base64()
These calls capture the active browsing context, so take them before navigating away or quitting the driver. Keep the session alive until the bytes have been consumed or the file has been copied.
Take a screenshot in Java
Java exposes screenshots through the TakesScreenshot interface. The standard pattern requests a temporary File and copies it to your chosen destination:
import java.io.File;
import org.apache.commons.io.FileUtils;
import org.openqa.selenium.OutputType;
import org.openqa.selenium.TakesScreenshot;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.chrome.ChromeDriver;
WebDriver driver = new ChromeDriver();
try {
driver.get("https://example.com");
File screenshotFile = ((TakesScreenshot) driver)
.getScreenshotAs(OutputType.FILE);
FileUtils.copyFile(screenshotFile, new File("./artifacts/page.png"));
} finally {
driver.quit();
}
The FileUtils class comes from Apache Commons IO, so that dependency must be available in your project. Other output types, including Base64, can be requested with getScreenshotAs(OutputType...). A driver that does not implement the screenshot contract can throw UnsupportedOperationException; a failed WebDriver operation can raise WebDriverException.
Capture one element instead of the window
When a failure concerns a component rather than the whole page, use the element screenshot API supported by your binding and browser/driver combination:
Recommended Free Tools
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
from selenium import webdriver
driver = webdriver.Chrome()
try:
driver.get("https://example.com")
heading = driver.find_element("tag name", "h1")
if not heading.screenshot("artifacts/heading.png"):
raise OSError("Element screenshot was not saved")
finally:
driver.quit()
Selenium’s documentation demonstrates element.screenshot(...) in Python, and Java’s API includes WebElement in the screenshot interface hierarchy. Wait until the element is present and in the state you want to document; an element screenshot does not automatically prove that hidden, clipped, or off-screen content was rendered.
What Selenium actually captures
Current window, not a guaranteed full document
The ordinary call is defined around the current window or current browsing context. Do not assume that save_screenshot produces one image containing every pixel of a long, scrollable document. Viewport size, browser, driver, and binding affect the result. If a full-page image is a requirement, verify the current official documentation for your exact browser and Selenium version rather than treating a browser-specific technique as universal.
Browser and driver conformance
The Java API says conformant implementations follow the WebDriver specification. For non-conformant implementations, behavior is best-effort and may vary by browser; unsupported capture can fail explicitly. Pin compatible browser and driver versions in CI, and preserve the actual exception and driver logs when diagnosing a failure.
Capture the right state
Screenshot immediately after the action or assertion you are investigating. If the page is asynchronous, wait for a meaningful condition—such as a result element becoming visible—before capturing. A screenshot taken during a transition can accurately record an intermediate state while still being useless for debugging.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.
Paths, formats, and failure handling
Use a deterministic artifact path
- Construct the path under a known artifact directory instead of relying on the test runner’s current working directory.
- Create parent directories before saving.
- Use a
.pngfilename for Python’s file API. - Include test name, browser, or timestamp in the filename when multiple failures can occur in one run.
Check the save result
Python returns False on an I/O error. Treat that result as a failed artifact step and log the absolute destination. In Java, handle the relevant WebDriverException, file-copy exception, or unsupported-operation error rather than swallowing it.
Keep the driver open
A closed session cannot provide a screenshot. Capture before driver.quit(), and do not reuse a driver after a fatal browser or session error unless your test framework creates a fresh session.
Common mistakes and fixes
| Symptom | Likely cause | Fix |
|---|---|---|
| No file appears | Relative path points somewhere unexpected, directory is missing, or process lacks permission | Use an absolute path, create the parent directory, and check the Boolean result |
| Wrong or rejected filename | Non-PNG extension used with the Python file method | Use a path ending in .png |
| Blank or transitional image | Capture happened before navigation, rendering, or an AJAX update completed | Wait for a specific page condition, then capture |
| Unsupported-operation or WebDriver error | Closed session, incompatible driver, or non-conformant implementation | Capture while the session is active; align browser/driver versions and inspect the original exception |
| Only the visible area is present | Generic screenshot is a current-window capture | Confirm the exact full-page capability for your browser and binding; do not assume universal document capture |
Use screenshots effectively in automated tests
Capture on failure
Most test frameworks let a teardown hook or failure listener save a screenshot after an assertion fails. Ensure the hook checks whether the driver still has a valid session, writes to a unique path, and attaches that path to the CI report.
Control the viewport
A screenshot is only comparable when the browser window, device emulation, zoom, and pixel scale are controlled. Record those settings with the artifact. Different browsers can produce different font rasterization and layout even at similar CSS dimensions.
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
Protect sensitive data
Screenshots can contain account names, tokens displayed in the UI, personal data, or customer records. Restrict artifact retention and access, and hide or redact sensitive fields before publishing a report.
Do not infer performance statistics
The Selenium API documentation does not establish a universal capture time, file size, or reliability percentage. Treat those as environment-dependent measurements if your own pipeline needs them.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
ScreenshotNeo provides a website screenshot API when you need a rendered URL rather than a browser session in your test process. A single GET request returns PNG, JPEG, WebP, or PDF. Before capture it accepts cookie/consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each cleanup step can be disabled. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers report the page verdict and billing status.
For the API parameters and all 63 options, see the ScreenshotNeo documentation. The 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
Python:
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)
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}`);
Beyond basic captures, ScreenshotNeo supports full-page lazy-image loading, CSS-selector element capture, dark mode, device presets and custom viewports, retina scale, PDF paper and page-range controls, custom CSS and JavaScript, clicks, selector/delay/network-idle waits, request and resource blocking, headers, cookies, user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, configurable-TTL caching, signed image links, asynchronous jobs with signed webhooks, bulk requests for up to 100 URLs, a usage API, and an OpenAPI specification. Its parameter names are compatible with those used by other screenshot APIs, which can simplify migration.
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.
An MCP server supplies take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 screenshots per month without a card; paid plans start at $5 for 3,000 shots, and every feature is included on every plan. Create a free ScreenshotNeo account.
FAQ
Can I save a screenshot as JPEG with Selenium’s Python method?
The documented save_screenshot method writes PNG. If another format is required, obtain PNG bytes and convert them with an image-processing library after capture.
Is a screenshot taken before or after an assertion?
Either is valid, but failure diagnostics are clearest when the capture follows the action and state check that exposed the problem, while the WebDriver session is still usable.
Why does the same test image differ between machines?
Window dimensions, device scale, fonts, browser versions, rendering engines, and page timing can differ. Standardize those inputs before using screenshots for visual comparison.
Frequently Asked Questions
Can I save a screenshot as JPEG with Selenium’s Python method?
The documented save_screenshot method writes PNG. Obtain PNG bytes and convert them with an image-processing library if another format is required.
Is a screenshot taken before or after an assertion?
Capture after the action and state check that exposed the problem, while the WebDriver session is still usable.
Why does the same test image differ between machines?
Window dimensions, device scale, fonts, browser versions, rendering engines, and page timing can differ; standardize those inputs for visual comparison.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →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.




