DriversRecommendedOutdated drivers can make a good PC feel brokenScan driver issues before chasing fixes manually.Scan NowOctober DealsAmazon USOctober deal check: compare before you payAmazon US: current deals, useful picks and tech finds.Check DealsPC HealthRecommendedCrashes, freezes, slowdowns? Check your PC nowSpot repairable issues before they interrupt work.Check PC×
Skip to content
World desk4 min

How to Take a Selenium Screenshot of a Page with a CAPTCHA

Use Selenium Python’s save_screenshot() to capture the current window as a PNG. Learn how to make reCAPTCHA test states repeatable and verify acceptance separately.
Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

In Selenium Python, call driver.save_screenshot("captcha.png") after the CAPTCHA page or test state is visible. It saves the current browser window as a PNG—not necessarily the whole scrollable page—and returns False if Selenium cannot write the file. A screenshot documents what the browser displayed; it does not prove that the CAPTCHA was accepted by your application.

Save the current Selenium window as a PNG

This example uses Selenium’s Python WebDriver API, documented for Selenium 4.50.0. Replace the example URL with a page you own or are authorized to test.

As an Amazon Associate I earn from qualifying purchases.

from pathlib import Path
from selenium import webdriver

output = Path("screenshots")
output.mkdir(parents=True, exist_ok=True)

driver = webdriver.Chrome()
try:
    driver.get("https://your-test-site.example/captcha")
    # Wait for the page and the required widget or test state to render.
    saved = driver.save_screenshot(str(output / "captcha.png"))
    if not saved:
        raise OSError("Selenium could not write the screenshot")
finally:
    driver.quit()

The official API also provides driver.get_screenshot_as_file("captcha.png"). Both methods save an image of the current window. Check the method’s Boolean result, and make sure the destination directory exists and is writable. See the Selenium Python WebDriver API.

What’s actually slowing this PC down?

Pick the symptom - the matching free tool is one click away.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Wait for the CAPTCHA state you intend to capture

Navigation completing does not guarantee that an asynchronously rendered CAPTCHA widget or application message is ready. Wait for the specific UI state your test needs before taking the image. For repeatable tests, configure the provider’s documented test setup rather than relying on a challenge appearing during an ordinary automated run.

#1 Best Overall
Sale
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
  • Compatible with Nintendo Switch 2’s new GameChat mode
  • Auto-Light Balance: RightLight boosts brightness by up to 50%, reducing shadows so you look your best—compared to previous-generation Logitech webcams (1)
  • Privacy with a Slide: The integrated webcam cover makes it easy to get total, reliable privacy when you're not on a video call
  • Built-In Mic: The built-in microphone lets others hear you clearly during video calls
  • Easy Plug-And-Play: The Brio 101 works with most video calling platforms, including Microsoft Teams, Zoom and Google Meet—no hassle; it just works

Choose the right reCAPTCHA test setup

Flow Google’s documented test approach What the screenshot can show
reCAPTCHA v2 Google provides test keys that always show “No CAPTCHA” and pass verification requests. The widget displays a warning so the test keys are not used for production traffic. A repeatable widget state, but not necessarily an interactive challenge.
reCAPTCHA v3 Use a separate key for testing environments. v3 is score-based, so a visible challenge may not appear, and test scores may not represent real traffic. The visible page UI only; the image does not reveal the score or establish the backend’s decision.

These are Google’s documented approaches; use test keys only in the intended test environment. Google’s guidance says: “For reCAPTCHA v3, create a separate key for testing environments.” See Google’s reCAPTCHA FAQ for test-key guidance and the reCAPTCHA v3 documentation for the score-based flow.

Configure domains and verify acceptance separately

Register the relevant development or staging domains with the key. Google says reCAPTCHA keys are normally restricted to registered domains and first-level subdomains, and localhost must be added for local development. Disabling domain or package validation presents a security risk; Google says applications that do so must perform server-side hostname or package checks. See Google’s domain validation guidance.

Rank #2
Sale
NexiGo N60 1080P Webcam with Microphone, Software Control & Privacy Cover, USB HD Computer Web Camera, Plug and Play, for Zoom/Skype/Teams, Conferencing and Video Calling
  • 【Full HD 1080P Webcam】Powered by a 1080p FHD two-MP CMOS, the NexiGo N60 Webcam produces exceptionally sharp and clear videos at resolutions up to 1920 x 1080 with 30fps. The 3.6mm glass lens provides a crisp image at fixed distances and is optimized between 19.6 inches to 13 feet, making it ideal for almost any indoor use.
  • 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 8, 10 & 11 / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.
  • 【Built-in Noise-Cancelling Microphone】The built-in noise-canceling microphone reduces ambient noise to enhance the sound quality of your video. Great for Zoom / Facetime / Video Calling / OBS / Twitch / Facebook / YouTube / Conferencing / Gaming / Streaming / Recording / Online School.
  • 【USB Webcam with Privacy Protection Cover】The privacy cover blocks the lens when the webcam is not in use. It's perfect to help provide security and peace of mind to anyone, from individuals to large companies. 【Note:】Please contact our support for firmware update if you have noticed any audio delays.
  • 【Wide Compatibility】Works with USB 2.0/3.0, no additional drivers required. Ready to use in approximately one minute or less on any compatible device. Compatible with Mac OS X 10.7 and higher / Windows 7, 10 & 11, Pro / Android 4.0 or higher / Linux 2.6.24 / Chrome OS 29.0.1547 / Ubuntu Version 10.04 or above. Not compatible with XBOX/PS4/PS5.

If your test needs to establish that CAPTCHA verification succeeded, assert the application’s result separately. Google’s server-side verification documentation says a response token is valid for two minutes and can be verified only once. A screenshot cannot establish that the backend accepted the token. See Google’s verification documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Troubleshoot missing or unusable screenshots

  • The PNG is missing: Check that the parent directory exists, the process can write there, and the save method returned True.
  • The capture shows the page but not the widget: Wait for the specific widget or test state to render before capturing; navigation completion alone may be too early.
  • No challenge appears: This can be expected with Google’s v2 test keys, which show “No CAPTCHA,” or with v3’s score-based flow, which may have no visible challenge.
  • The test fails on localhost or staging: Check that the domain is registered for the key; Google specifically requires localhost to be added for local development.
  • The screenshot looks correct but the integration fails: Check the application’s verification result separately. The image records browser output, not successful server-side verification.
  • The image contains sensitive information: Keep screenshots and logs free of real user secrets and production tokens; do not publish captures containing personal information or session credentials.

Or skip the browser setup

For a screenshot returned directly from an API, ScreenshotNeo accepts a URL in one GET request and can return PNG, JPEG, WebP, or PDF. Its cleanup options accept cookie and consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks and CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server includes tools for AI agents, and every feature is available on every plan.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://your-test-site.example/captcha -o shot.webp

See the ScreenshotNeo API documentation for setup and parameters. The API can capture a page, but it does not replace Selenium assertions or prove that your application accepted a CAPTCHA response.

Rank #3
Logitech C920S HD Pro Webcam Full 1080p/30fps Video Calling Clear Stereo
  • Webcam comes with privacy shutter – puts you in control of what you show and protects the lens with a snugly fitting cover. Does not include the 3-month XSplit VCam license.
  • Full HD 1080P video calls – premium video quality that makes you look like a Pro
  • Full HD 1080P video Recording – a glass lens and full HD mean your recorded videos are crisp and vibrantly colored
  • HD autofocus and light Correction – enjoy razor-sharp high Def in every environment
  • Stereo audio with dual mics – capture natural sound on calls and recorded videos

ScreenshotNeo’s Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots. Learn about ScreenshotNeo or sign up for 1,000 free screenshots a month, with no card.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Frequently Asked Questions

Can Selenium save the screenshot as a PNG?

Yes. Selenium Python’s `save_screenshot(“captcha.png”)` saves the current window as a PNG and returns a Boolean result.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Rank #4
NIVEOLI Webcam 1080P with Microphone & Privacy Cover for PC/Laptop, USB Computer Camera Plug & Play with Auto Light Correction for Video Calls, Live Streaming Gaming & Online Meetings
  • 【Crystal-Clear 1080P HD Video】This 1080p webcam for PC delivers sharp, true Full HD video at 30 frames per second, bringing your digital world to life with vibrant clarity. Enjoy smooth, real-time streaming with enhanced high dynamic range (HDR) that keeps your face clearly visible even in low light or backlit conditions.
  • 【Built-In Noise-Canceling Microphone】This computer camera with microphone features dual noise-reducing digital mics and an advanced audio processor, capturing rich stereo sound while filtering background noise. It ensures clear conversations during video calls, even in busy environments.
  • 【Privacy Shutter for Added Security】This secure USB webcam includes a built-in privacy cover, letting you physically block the lens with a simple slide. Protect your visibility and keep the lens dust-free—no drivers needed, just plug into USB 2.0 and start using it immediately.
  • 【Flexible Mount & Auto Light Correction】Designed for your computer or laptop, this webcam comes with an adjustable clip for monitors or standalone use. It offers automatic light correction and fixed focus for sharp, well-balanced images in any lighting.
  • 【Wide Device & Platform Compatibility】This versatile webcam for laptop and desktop use is compatible with Windows, Mac, Linux, and Android systems. Supports Skype, Zoom, Twitch, YouTube, and more—featuring a 360° rotating head for easy adjustment. Simply plug and play.

Does a Selenium screenshot prove that reCAPTCHA passed?

No. It records browser output. Check your application’s server-side verification result separately.

Quick Recap

SaleBestseller No. 1
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
Logitech Brio 101 Full HD 1080p Webcam for Streaming and Meetings - Black
Compatible with Nintendo Switch 2’s new GameChat mode; Built-In Mic: The built-in microphone lets others hear you clearly during video calls
$35.80
Bestseller No. 3
Logitech C920S HD Pro Webcam Full 1080p/30fps Video Calling Clear Stereo
Logitech C920S HD Pro Webcam Full 1080p/30fps Video Calling Clear Stereo
Full HD 1080P video calls – premium video quality that makes you look like a Pro; HD autofocus and light Correction – enjoy razor-sharp high Def in every environment
$69.99
Best Value
Anker PowerConf C200 2K Webcam for PC/Laptop/Mac, Low-Light Correction
  • 2K Ultra-Clear Resolution: Enjoy sharp, detailed video with this 2K resolution webcam for professional-grade conferences, enhancing your PC setup.
  • Advanced Audio Clarity with AI Noise Cancellation: This webcam features dual mics to ensure voices are crystal clear, even in noisy environments, making it ideal for virtual meetings.
  • Superior Low-Light Performance: This webcam captures crisp images in dim settings without extra lighting, perfect for any home office or late-night streaming.
  • Customizable Viewing Angles: Choose from 65°, 78°, or 95° via software to frame your perfect shot during video calls with this versatile webcam for PC.
  • Privacy When You Need It: An integrated cover slides easily over the lens of this webcam for security and peace of mind between calls.

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.

Leave a Reply

Your email address will not be published. Required fields are marked *

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

More from the Wire

  1. World desk4 min
    How to Spot an AI Voice Scam Before Sending MoneyDon’t rely on how a caller sounds. Pause, call back through a known number, and verify the emergency with another trusted person before sending money.
  2. Mountain View desk4 min
    Google’s SynthID Detector: How to Check AI-Generated Images, Video and AudioGoogle’s SynthID Detector looks for an embedded watermark in supported images, video and audio. Here is what its results do—and do not—show.
  3. Redmond desk20 min
    How to create a link to File or Folder in Windows 11Windows 11 gives you several ways to point to a file or folder without moving or duplicating it. You can create a desktop shortcut,…
Recommended PC Tool
Recommended PC Tool
Crashes, No Sound, or Screen Glitches?Free driver scan
PC Slower Than It Used to Be?Free scan - under a minute

Two free Windows tools

One Free Minute Could Fix That PC

Before you go - each of these free tools takes about a minute and tackles what quietly slows a Windows PC down.

Special offer. View Outbyte info, uninstall instructions, EULA, and Privacy Policy.