Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallUse one Selenium WebDriver session, loop through your URLs, wait for each page to reach the state your test needs, and save the current browser window to a distinct PNG file with driver.save_screenshot(). Set a consistent viewport and close the driver in a finally block so the run stays repeatable and the browser is shut down even when a capture fails.
Capture a list of URLs with one Selenium session
This example saves one viewport screenshot per URL. It creates the output directory, gives each file a unique index and hostname, checks Selenium’s save result, and always quits the driver.
from pathlib import Path
from urllib.parse import urlparse
from selenium import webdriver
urls = [
"https://example.com/",
"https://www.selenium.dev/",
]
output_dir = Path("screenshots")
output_dir.mkdir(parents=True, exist_ok=True)
options = webdriver.ChromeOptions()
options.add_argument("--headless")
driver = webdriver.Chrome(options=options)
driver.set_window_size(1440, 1000)
try:
for index, url in enumerate(urls, start=1):
driver.get(url)
# Wait for the application state your test needs before capturing.
host = urlparse(url).netloc.replace(":", "_") or "page"
path = output_dir / f"{index:03d}_{host}.png"
saved = driver.save_screenshot(str(path))
if not saved:
print(f"Screenshot save failed: {url} -> {path}")
finally:
driver.quit()
Selenium documents save_screenshot(filename) as saving the current window to a PNG and returning a Boolean; it recommends a full path ending in .png. A false return signals an I/O error. The method captures the current window, not a guaranteed full-page image. See the Selenium Python WebDriver API.
The example’s index prevents repeated hostnames from overwriting one another. If your list can contain the same URL more than once, include a run ID or other unique identifier in each filename. Hostnames are illustrative; for arbitrary URLs, sanitize path components before using them as filenames.
Free tools Windows power users keep installed
One-click scans. No signup required.
#1 Best Overall
Make captures useful for bulk testing
Keep the test conditions consistent
Set the viewport deliberately before the loop. For visual comparisons, also hold the browser version, test data, relevant user state, and page-readiness condition steady. Otherwise, differences between images may come from the capture environment or changing page content rather than the code under test.
Wait for the condition you are testing
Navigation completing does not necessarily mean that a single-page application, image, or asynchronously loaded component is ready. Replace the comment in the example with a condition-based wait for the target view—for example, wait for the specific element or state that signals the tested screen is ready. Avoid relying on an arbitrary short sleep when a meaningful application condition is available.
Rank #2
Report failures and shut down cleanly
Check the Boolean returned by save_screenshot and record the URL and destination for failed saves. Navigation or wait failures can also interrupt a batch, so catch and log per-URL exceptions if you want later URLs to continue; decide whether the test should ultimately fail when any page fails. Keep driver.quit() in finally so it runs after both success and exceptions. Selenium’s documentation also demonstrates shutting down the driver after capture in its windows and tabs guide.
Choose Selenium or Chrome’s headless command line
| Route | Best fit | Trade-off |
|---|---|---|
| Selenium Python WebDriver | Bulk tests that need browser interactions, state setup, or per-URL automation. | Requires a browser-driver session and test-specific readiness logic; the documented screenshot is of the current window. |
| Chrome headless command line | A simple URL capture with an explicit viewport size. | The documented command-line capture does not provide Selenium’s programmed test loop or interaction workflow. |
Chrome’s headless command-line reference documents --screenshot and an example using --window-size=412,892. Use Selenium when the test must prepare or interact with pages; a command-line capture may suit a simpler one-off URL. In either route, verify what capture scope and page state your particular workflow needs.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Or skip the browser setup
ScreenshotNeo provides a screenshot API and MCP server for developers. Its one-call GET request accepts a URL and returns an image or PDF. For a PNG capture:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com/ -o shot.png
See the ScreenshotNeo API documentation for request options. Cookie banners, popups, and chat widgets are removed before capture; bot checks, blank pages, and failed loads are not billed. Its MCP server lets AI agents take screenshots, and the free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Frequently Asked Questions
Does Selenium’s save_screenshot() capture a full webpage?
No. Selenium documents it as capturing the current window; this method alone does not promise a full-page screenshot.
What does a false result from save_screenshot() mean?
The Selenium API documents the Boolean return as false on an I/O error, so check the output path and record the failed save.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Repair Windows errors before they cause bigger problemsFix Now →Quick Recap
Best Value
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.




