Free tools Windows power users keep installed
One-click scans. No signup required.
For a PNG of the current browser window, navigate with Selenium and call driver.save_screenshot("screenshot.png"). Use element.screenshot(...) when you need one element, and Selenium’s Python BiDi capture API when you need to request a viewport or document screenshot. The right method depends on the capture scope and the Selenium/browser versions you have installed.
Capture the current browser window with Selenium
This Python example starts Chromium through Selenium, opens a page, saves the current-window screenshot as a PNG, checks whether saving succeeded, and closes the driver even if navigation or capture raises an error.
As an Amazon Associate I earn from qualifying purchases.
from selenium import webdriver
options = webdriver.ChromeOptions()
options.add_argument("--headless=new") # Optional: run without a visible browser window.
driver = webdriver.Chrome(options=options)
try:
driver.get("https://example.com")
ok = driver.save_screenshot("screenshot.png")
if not ok:
raise OSError("Screenshot could not be saved")
finally:
driver.quit()
The Selenium guide documents the webdriver.Chrome() and save_screenshot('./image.png') workflow. The headless option is optional; Selenium’s Chrome guide shows passing arguments through ChromeOptions, including --headless=new. Selenium WebDriver documentation and Chrome-specific guidance describe these APIs and setup.
The Tool Desk
Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →save_screenshot(path) writes a PNG of the current window and returns False if there is an I/O error. The example turns that return value into an explicit error so a failed write is not silently treated as success. You can also retrieve screenshot data as bytes with driver.get_screenshot_as_png(), or use the screenshot APIs that return Base64 data when that representation fits your workflow. See the Selenium Python Chromium WebDriver API.
#1 Best Overall
Choose the screenshot scope you need
| Need | Python API | What it captures |
|---|---|---|
| Ordinary screenshot | driver.save_screenshot("screenshot.png") |
Current browser window, saved as PNG. |
| One element | element.screenshot("element.png") |
The located element, saved as a separate image. |
| Viewport or document capture | driver.browsing_context.capture_screenshot(...) |
BiDi screenshot data requested with a viewport or document origin; the method returns Base64 data. |
Capture one element
Locate the element you want, then call its screenshot method. For example, after creating driver and navigating to a page:
from selenium.webdriver.common.by import By
element = driver.find_element(By.CSS_SELECTOR, "main")
ok = element.screenshot("main.png")
if not ok:
raise OSError("Element screenshot could not be saved")
This is useful when the output should be limited to a specific element rather than the whole current window. Selenium’s official guide demonstrates the Python element screenshot pattern: Selenium WebDriver documentation.
Rank #2
Request a viewport or whole-document screenshot with BiDi
Selenium’s Python BiDi browsing-context API accepts an origin of "viewport" or "document", an optional clip rectangle, and returns Base64 screenshot data. The following is the capture call shape; it assumes BiDi support is enabled for the driver and that you have the relevant browsing-context identifier:
encoded = driver.browsing_context.capture_screenshot(
context=context_id,
origin="document", # Or "viewport"
)
This is a BiDi API, not a drop-in spelling of save_screenshot. Check the API documentation for your installed Selenium version and browser before using it; setup and support can vary. The documented Python method and parameters are in the Selenium Python BiDi browsing-context API.
Rank #3
Wait for the page state you actually need
driver.get(url) waits until the page’s onload event fires. That does not guarantee that asynchronous JavaScript, lazy-loaded images, animations, or fonts have finished changing the visual page. For a repeatable capture, wait for a page-specific signal—for example, a known element or application state—rather than assuming a fixed sleep or the load event means the page is visually settled. The navigation behavior is documented in the Selenium Python Chromium WebDriver API; the readiness condition should be chosen for the site you are capturing.
Set up Chromium and keep versions aligned
Selenium’s Chrome-specific documentation says Selenium 4 is compatible with Chrome 75 and greater and advises that Chrome and ChromeDriver have the same major version. Configure browser arguments with ChromeOptions, and check the documentation for the Selenium release installed in your environment when reproducing a setup: Selenium Chrome documentation.
Rank #4
Troubleshoot common screenshot problems
- The screenshot file is missing or cannot be opened: Check the destination path and whether the process can write there.
save_screenshotreturnsFalseon an I/O error; check the result instead of assuming a file was produced. - The capture shows a loading state or incomplete content: Navigation’s
onloadwait does not establish that asynchronous content, lazy images, fonts, or animations have settled. Wait for a site-specific element or state before capturing. - Chrome fails to start or the driver cannot control it: Check that Chrome and ChromeDriver have matching major versions, and confirm that the installed Selenium release supports your setup.
- The whole page is not included: The ordinary
save_screenshotmethod captures the current window. For a document-origin capture, use the separate BiDi API and verify that it is available in your installed Selenium/browser versions.
Performance, reliability, and cost considerations
The documented APIs establish capture scope and output formats, not a universal capture time or identical visual fidelity across websites, operating systems, browser versions, and page lengths. Actual results depend on the page and environment. For reliable automated work, make readiness conditions specific to the page, handle file-write failures, and always close the driver after use. The example’s finally block is ordinary Python cleanup practice, not a guarantee that every browser or page will behave identically.
Selenium and Chromium are software APIs; the cited documentation does not establish a per-screenshot service price. Cost depends on the environment in which you run the browser and any infrastructure you provide.
Best Value
Or skip the browser setup
If you need a hosted screenshot instead of managing Selenium and Chromium, ScreenshotNeo takes a screenshot or PDF with one GET request. Cookie and consent banners are accepted like a visitor and 60+ known consent platforms, newsletter popups, and chat widgets are removed before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and the response reports the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for AI agents and MCP clients. The Free plan includes 1,000 shots a month with no card; paid plans start at $5 for 3,000 shots.
Example cURL request, using the documented API shape:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
See the ScreenshotNeo API documentation for parameters and setup. Sign up for ScreenshotNeo’s free plan to get 1,000 screenshots a month with no card.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsQuick 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.




