Recommended Free Tools
Selenium WebDriver can capture browser screenshots for debugging and visual testing. The screenshot call gives you an image; it does not decide whether the page looks correct. For visual regression testing, you also need a baseline, repeatable capture conditions, a way to compare images, and a process to review differences.
How Selenium screenshot capture works
Screenshot capture is exposed through WebDriver APIs, but exact methods and capture scope depend on the language binding and browser driver. Java documents capture through the TakesScreenshot interface, including driver and element capture. Python documents PNG file, byte, and Base64 forms for the current window in its Chromium WebDriver API. Firefox’s Python API also documents a full-document screenshot method. Do not assume one binding’s scope or method is available in another.
The practical sequence is straightforward: navigate to the page, wait until the state you want to inspect is ready, capture, and keep the image with enough test context to interpret it. Capturing too early can produce a valid screenshot of a loading state rather than the intended page.
Save a screenshot with Selenium in Python
This example uses Selenium’s Python WebDriver API to save a PNG of the current window. It waits for a known element before capturing, which is more reliable than assuming a fixed delay is enough. Install Selenium and the browser/driver setup appropriate to your environment, then adjust the URL and selector to match your test.
#1 Best Overall
- Read Before You Buy — No Video Output: These adapters support charging and USB 2.0 data transfer, but cannot transmit video signals. Except for standard USB webcams (which use USB data only), they are not compatible with HDMI/DisplayPort cables, video-capable USB-C hubs, or docking stations with video output.
- Convert USB-A Ports to USB-C: Designed to connect USB-C earphones, cables, flash drives, card readers, and other USB-C accessories to standard USB-A ports. Plug-and-play with no drivers or software required.
- Aluminum Alloy Housing: Built with a sturdy aluminum alloy shell that aids in heat dissipation and protects against daily wear and scratches. Designed to maintain a stable and secure connection.
- Compact & Travel-Friendly: The ultra-compact design allows the adapter to stay plugged into your device without blocking adjacent ports or adding bulk, reducing wear and tear on your original USB ports.
- 12-Month Warranty: Backed by a 12-month manufacturer warranty for peace of mind. Designed to meet strict quality control standards for reliable everyday performance.
from pathlib import Path
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
output = Path("artifacts")
output.mkdir(exist_ok=True)
driver = webdriver.Chrome()
try:
driver.get("https://example.com")
WebDriverWait(driver, 20).until(
EC.visibility_of_element_located((By.CSS_SELECTOR, "h1"))
)
saved = driver.save_screenshot(str(output / "page.png"))
if not saved:
raise RuntimeError("WebDriver did not save the screenshot")
finally:
driver.quit()
The Python API documents save_screenshot and get_screenshot_as_file for PNG output, as well as methods that return PNG bytes or Base64-encoded data. Check the API documentation for the binding and browser you actually run; a remote driver may also have different file-transfer or artifact-retention behavior.
Use the returned data instead of a file
For a pipeline that uploads artifacts itself, in-memory bytes avoid an intermediate file:
png_bytes = driver.get_screenshot_as_png()
# Send png_bytes to your artifact store or image-processing code.
If an integration accepts Base64, the API also exposes a Base64 screenshot form. Decode it only where needed, and avoid logging the full encoded image into test logs.
Choose the screenshot scope deliberately
A screenshot may represent the visible browser window, a selected element, or a full document. These are not interchangeable: a viewport capture can omit content below the fold, while a full-document capture can include substantially more page area and may behave differently with sticky elements or lazy-loaded content.
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 →| Scope or output | What it is useful for | What to verify |
|---|---|---|
| Current window or viewport | Investigating what a user saw at a particular test step; checking a responsive layout at a chosen viewport. | Viewport dimensions, scroll position, and whether the driver captures only the visible region. |
| Element | Inspecting a component without unrelated page content. | Whether the language binding and driver support element capture and how clipping is handled. |
| Full document | Reviewing long pages or content below the fold. | Driver-specific support and treatment of lazy content, fixed elements, and page height. |
| PNG file, bytes, or Base64 | Saving an artifact, passing it to image processing, or handing it to a system that expects encoded data. | Expected format, storage destination, transfer behavior, and cleanup. |
The Java TakesScreenshot API describes driver and element capture. The Python Firefox API separately documents a full-document screenshot method. That is evidence of API variation, not a promise that every browser supports every scope in the same way. Confirm current behavior for your Selenium version, browser, and driver before building a test around it.
Rank #2
- 5-in-1 USB-C Hub: Experience comprehensive connectivity featuring a Power Delivery input, two USB-A 2.0 ports, a USB-A 3.0 port, and an HDMI port. (Note: The USB-C power delivery input port is only for connecting an external wall charger to power your laptop and cannot power peripheral devices.)
- 90W Pass-Through Charging: Achieve optimal charging with 90W pass-through power to your laptop, supported by a total input of 100W, with the hub reserving 10W for operational efficiency. (Note: Wall charger not included.)
- Quick Data Transfers: Accelerate your productivity with rapid data transfers using a high-speed 5Gbps USB 3.0 port and two 480Mbps USB 2.0 ports.
- 4K HDMI Display: Enhance your visual experience with a hub capable of delivering 4K resolution at 30Hz in both mirror and extend modes. Please note that this hub is compatible with MacBook (macOS 12 and newer), Windows 10 and 11, ChromeOS, and laptops equipped with DP Alt Mode and Power Delivery. Note: This device is not compatible with Linux.
- What You Get: Anker USB-C Hub (5-in-1, 4K HDMI), welcome guide, 18-month warranty, and our friendly customer service.
Use screenshots to investigate test failures
A screenshot is most useful when it is tied to the exact failing test, browser state, and step that matters. Capture after a failure has been detected but before teardown closes the browser. Retain the test name and relevant run details alongside the image so a developer can tell which page state it represents.
- Capture on failure if the goal is efficient triage with fewer artifacts.
- Capture at selected milestones when a failure can arise from several different states.
- Store screenshots with the test report or build artifacts, and set a retention policy that fits your team’s storage needs.
- Consider whether images may contain personal, account, or other sensitive data before publishing artifacts broadly.
Selenide documents automatic screenshot capture on test failure and configuration for the reports folder in its screenshot documentation. Its integrations also describe capture on successful tests. Those are framework features, not automatic behavior guaranteed by Selenium WebDriver itself.
Turn captures into visual regression tests
To test visual changes, compare a new capture with an approved baseline. A screenshot API only produces the image; it does not define what differences matter or approve a changed page. A useful visual test needs a deliberate baseline update policy and human review of meaningful differences.
- Define a stable page state. Wait for the content and layout that the test is intended to cover. Avoid capturing while animations, asynchronous content, or loading indicators are still changing.
- Fix capture conditions. Use the same browser version, operating system, viewport, device scale factor, and relevant settings for baseline and later runs. Set locale, timezone, fonts, and test data consistently where they affect rendering.
- Control dynamic regions. Use stable fixtures or deliberately handle timestamps, rotating content, ads, avatars, and other changing areas. Masking or excluding a region can reduce noise, but should not hide an area whose appearance is part of the requirement.
- Choose the comparison policy. Decide whether any pixel difference fails, whether a tolerance is allowed, and how large or localized a difference must be to require review. A difference image can help locate changes, but a numeric score alone does not explain whether a change is acceptable.
- Review before replacing a baseline. Inspect the changed capture, determine whether the difference is an intended design change or a defect, then update the baseline only through the team’s review process.
Rendering can vary with host operating system, browser version, settings, hardware, power source, and headless mode. Playwright’s official visual comparison guidance recommends matching the environment used to create baselines; that is useful cross-tool guidance, not a Selenium-specific capability. If a test moves between local machines and CI, environment drift can look like a product regression.
Rank #3
- Sleek 7-in-1 USB-C Hub: Features an HDMI port, two USB-A 3.0 ports, and a USB-C data port, each providing 5Gbps transfer speeds. It also includes a USB-C PD input port for charging up to 100W and dual SD and TF card slots, all in a compact design.
- Flawless 4K@60Hz Video with HDMI: Delivers exceptional clarity and smoothness with its 4K@60Hz HDMI port, making it ideal for high-definition presentations and entertainment. (Note: Only the HDMI port supports video projection; the USB-C port is for data transfer only.)
- Double Up on Efficiency: The two USB-A 3.0 ports and a USB-C port support a fast 5Gbps data rate, significantly boosting your transfer speeds and improving productivity.
- Fast and Reliable 85W Charging: Offers high-capacity, speedy charging for laptops up to 85W, so you spend less time tethered to an outlet and more time being productive.
- What You Get: Anker USB-C Hub (7-in-1), welcome guide, 18-month warranty, and our friendly customer service.
Browser setup, repeatability, and cost
Local WebDriver capture gives you control over the browser session and is a natural fit when the screenshot is one assertion or artifact inside an existing UI test. Its cost is the browser and driver setup, test runtime, and responsibility for storing and comparing images. Remote grids add their own questions, including where screenshots are written and how artifacts move from the remote machine to the test runner.
For reliable suites, capture only the states that add diagnostic or visual value, keep browser versions controlled, and make artifact retention intentional. Full-document images and unnecessary captures can increase storage and review load. A Selenium screenshot call itself does not eliminate instability from network-dependent content or inconsistent rendering.
Or skip the browser setup
If you need a screenshot from a URL rather than a browser session managed by your test, ScreenshotNeo offers a one-request screenshot API. Its capture can accept cookie/consent banners like a visitor and remove 60+ known consent platforms, newsletter popups, and chat widgets; each cleanup step can be turned off. Bot checks/CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, with verdict and billing status returned in response headers. ScreenshotNeo also provides an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
cURL example; see the ScreenshotNeo API documentation for options and response details:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000 screenshots. This is a URL-to-image or PDF service, not a replacement for Selenium when a test must interact with a browser session, inspect a particular in-session state, or assert application behavior.
Rank #4
- Dual Converters, Infinite Potential:Includes 2× USB C male to USB A female adapters and 2× USB A male to USB C female adapters. Perfect for a wide range of uses—tablets with Bluetooth keyboards, expand USB ports on macbook, and more. Two different converters for all your daily needs
- Next-Level 10Gbps & 3A Charging: No more slow 480Mbps, this usb to usb c adapter has a transfer speed of up to 10Gbps, allowing you to do more transferring in less time. This usb adapter fits both USB A and USB C charger, supporting up to 3A fast charging
- Upgraded Exquisite Craftsmanship: With an aluminum alloy housing and metal connector, the usbc to usb adapter is extremely durable and sturdy. Rigorously tested to withstand more than 10,000 times of plugging and unplugging, ensuring long-lasting performance
- Broad Compatible: The usb c to usb adapter widely supports all USB C/ USB A devices like laptops, tablets, cellphones, car chargers, and phone chargers. Such as compatible with MacBook Pro/Air 2023/2022, Thunderbolt 4/3 Devices,Apple MagSafe Watch 9/8/7/SE/Ultra, iPad Pro 2022/2021, Samsung Galaxy S23/S20/S10, and iPhone 17/16/15 Pro. Plug and play
- Please Note: To reach 10Gbps speed, keep the cable under 3.3 ft. For USB A Male to USB C adapters, try flipping the USB C connector. USB C Male to USB A adapters support bidirectional 10Gbps transfer within 3.3 ft
Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Troubleshooting Selenium screenshots
The image shows a loading screen or incomplete page
The capture probably ran before the relevant content was ready. Wait for a specific element or application state, not just a short hard-coded sleep. If content loads after scrolling, trigger the required state before capture and check that it has appeared.
The screenshot does not include the whole page
You may be using a current-window capture, which is not necessarily a full-document capture. Check the API for your binding and browser driver. Firefox’s Python API documents a full-document method; do not assume the same call or behavior applies elsewhere.
The screenshot file is missing or empty
Check the path, parent directory, process permissions, and whether the browser session was still active at capture time. Python’s file-saving methods report success as a boolean; check that return value and retain exceptions from the test rather than silently discarding them.
Best Value
- 5-in-1 Connectivity: Equipped with a 4K HDMI port, a 5 Gbps USB-C data port, two 5 Gbps USB-A ports, and a USB C 100W PD-IN port. Note: The USB C 100W PD-IN port supports only charging and does not support data transfer devices such as headphones or speakers.
- Powerful Pass-Through Charging: Supports up to 85W pass-through charging so you can power up your laptop while you use the hub. Note: Pass-through charging requires a charger (not included). Note: To achieve full power for iPad, we recommend using a 45W wall charger.
- Transfer Files in Seconds: Move files to and from your laptop at speeds of up to 5 Gbps via the USB-C and USB-A data ports. Note: The USB C 5Gbps Data port does not support video output.
- HD Display: Connect to the HDMI port to stream or mirror content to an external monitor in resolutions of up to 4K@30Hz. Note: The USB-C ports do not support video output.
- What You Get: Anker 332 USB-C Hub (5-in-1), welcome guide, our worry-free 18-month warranty, and friendly customer service.
Visual tests fail with differences on another machine
Compare the baseline and current browser version, operating system, viewport, device scale, fonts, and headless configuration. Stabilize dynamic page content and use the same environment for baseline generation and comparison when possible.
Failure artifacts are not being retained
WebDriver does not by itself define your test report’s artifact lifecycle. If using a framework such as Selenide, check its screenshot and reports-folder configuration; otherwise capture before teardown and explicitly save or upload the image in your test runner.
When Selenium screenshots are the right tool
Use WebDriver screenshots when you need evidence from a live automated browser session: a failing interaction, a particular authenticated state, or a visual assertion within a UI test. For visual regression, pair the capture with controlled conditions, baselines, comparison rules, and review. For a standalone screenshot of a public URL, an API can avoid maintaining browser setup; choose based on whether the task needs a full test session or just an image.
Frequently Asked Questions
Does Selenium screenshot capture prove that a page passed a visual test?
No. Capture produces an image; a visual test also needs a baseline, a comparison method, and review of differences.
Can all Selenium browsers capture a full-page screenshot the same way?
No universal behavior is established across drivers and bindings. Check the API for the exact browser, driver, and Selenium version you run.
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.

