What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Save the Selenium screenshot to a PNG file, then upload that file to an S3 bucket with Boto3. If your test runner should not hold AWS credentials, have a trusted component generate a presigned upload request instead.
Save a Selenium screenshot and upload it with Boto3
Selenium’s Python WebDriver method save_screenshot() saves the current window as a PNG. Boto3’s S3 transfer helper upload_file() uploads a local file to a bucket and object key. The example below combines those documented methods; replace the bucket, key, and driver setup with values from your application.
from pathlib import Path
import boto3
# Assumes `driver` is an initialized Selenium WebDriver.
bucket = "your-bucket"
key = "selenium/run-123/test-checkout.png"
local_path = Path("artifacts/test-checkout.png")
local_path.parent.mkdir(parents=True, exist_ok=True)
if not driver.save_screenshot(str(local_path)):
raise RuntimeError("Selenium did not save the screenshot")
boto3.client("s3").upload_file(str(local_path), bucket, key)
Configure AWS credentials through the runtime’s approved credential mechanism rather than putting secrets in source code. The AWS identity used by Boto3 needs permission to upload to the destination bucket and key. In a CI job, make sure the artifacts directory exists and that the WebDriver is still open when the screenshot is taken.
Upload a binary file object instead
If you already have a readable binary file handle, Boto3 also provides upload_fileobj(). Open the file in binary mode:
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →#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.
with local_path.open("rb") as screenshot_file:
boto3.client("s3").upload_fileobj(
screenshot_file,
bucket,
key,
)
Boto3’s transfer helper can split large files into parts and upload them in parallel. That capability is handled by the helper; no upload-speed claim is implied here.
Choose between direct credentials and a presigned upload
| Approach | Use it when | What to configure |
|---|---|---|
| Direct Boto3 upload | The test runner has an approved AWS identity that can write to the intended bucket and key. | Use upload_file() for a path or upload_fileobj() for a readable binary stream, and grant only the required access. |
| Presigned upload | A trusted service can authorize the upload, but the test runner should not have general AWS credentials. | Generate a time-limited request for the specific object and follow the generated method, fields, and signed headers. |
AWS describes a presigned URL as a way to grant temporary access to someone who lacks AWS credentials or permission to access an S3 object. The URL’s capabilities are limited by the permissions of the AWS identity that created it. Boto3 documents presigned POST, which returns a URL and form fields; AWS also documents a PUT approach. Use the request form that your generating component specifies: a POST form and a PUT request are not interchangeable.
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.
Protect the upload URL and choose a unique key
- Treat a presigned URL as a bearer token. Keep it out of public logs, source control, and user-visible output.
- Use a collision-resistant key, such as a test-run identifier, test name, and capture time. Uploading to an existing key replaces the object at that key; do not assume version history unless bucket versioning has been checked.
- Use an expiry that fits the workflow. The URL can stop working when its configured expiry is reached, its signing credentials expire, or those credentials are revoked or deactivated. AWS documents SDK and CLI presigned URL lifetimes of up to seven days for eligible credentials; temporary role credentials may expire sooner.
- For SigV4 uploads that use a checksum algorithm, send the corresponding checksum header required by the signed request.
Use screenshots as CI artifacts
For CI debugging, a local screenshot can be useful even if you also upload it to S3: the local file remains available to the job’s artifact collector, while the S3 copy can be retrieved through your team’s normal access path. This is a workflow choice, not a performance comparison.
- Choose a key format that separates runs and tests, for example
selenium/<run-id>/<test-name>-<timestamp>.png. - Create the local parent directory before calling
save_screenshot(). - Check the boolean result from
save_screenshot()and fail or report the test appropriately if the image was not saved. - Upload only after capture succeeds. Preserve the local file if your CI system also collects local artifacts.
- Apply the smallest practical permissions to the AWS identity or presigning service, scoped to the destination bucket and key pattern.
Troubleshoot failed captures and uploads
Selenium reports that it did not save the screenshot
save_screenshot() returns a boolean. If it returns false, do not attempt the upload; check that the driver session is active and that the destination directory exists and is writable.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.
Boto3 reports an access or credentials error
Confirm that the runtime can obtain credentials through its configured AWS provider and that the associated identity has permission for the intended S3 upload. Avoid fixing this by embedding long-lived secrets in the test source.
The presigned request returns SignatureDoesNotMatch
AWS recommends checking that the URL was not altered, has not expired, the system clock is synchronized, the request’s content type matches the type used when signing, and the bucket Region is correct. Also send any signed headers exactly as required by the presigning component.
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
The upload succeeds but a newer screenshot replaced the old one
S3 writes to the object key in the request. If multiple tests use the same key, later uploads replace the object stored there. Give each run a distinct key; check bucket versioning separately if you need retained versions.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
If the goal is a clean website image rather than a screenshot from an existing Selenium test session, ScreenshotNeo can return a screenshot or PDF with one GET request. Its cleanup can accept consent banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, and response headers indicate the page verdict and billing status. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents.
For the full request options, see the ScreenshotNeo documentation. Replace the example URL with the page you want to capture:
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.
curl -G "https://api.screenshotneo.com/v1/shot"
-d access_key=YOUR_API_KEY
--data-urlencode url=https://stripe.com
-o shot.webp
There are 1,000 screenshots per month on the free plan with no card required; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.
Frequently Asked Questions
Can I upload a Selenium screenshot without saving it to disk?
Yes. Selenium’s documented method saves a PNG file; for an in-memory workflow, use a compatible readable binary stream with Boto3’s upload_fileobj().
Does a presigned URL give the test runner general AWS access?
No. It delegates the permitted operation on the specified object for a limited period, bounded by the signer’s permissions.
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.

