What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
If Selenium cannot save a screenshot on Linux, first give it an explicit absolute filename in a directory the test process can access. Then check the effective user running the test, whether the file already exists, and permissions on every directory in the path. Selenium’s screenshot file methods return False when an I/O error occurs, so check the result rather than assuming the image was written.
Start with an absolute path and check the result
Selenium writes the PNG to the filename supplied by your script. A relative filename depends on the process’s working directory, which may differ between a terminal, IDE, service, container, and CI runner. Use an absolute path ending in .png to make the destination clear.
As an Amazon Associate I earn from qualifying purchases.
from pathlib import Path
from selenium import webdriver
output = Path("/tmp/selenium-output/page.png")
output.parent.mkdir(parents=True, exist_ok=True)
driver = webdriver.Chrome()
try:
saved = driver.save_screenshot(str(output))
if not saved:
raise OSError(f"Selenium could not save screenshot to {output}")
if not output.is_file():
raise OSError(f"Screenshot was not created at {output}")
finally:
driver.quit()
The directory creation line handles a missing directory only if the process has permission to create it. Choose a location appropriate to your system; /tmp is just an example, not a guaranteed destination for every environment. Selenium’s API documentation recommends full paths and says its file-saving method returns False on an I/O error. See Selenium WebDriver API documentation.
Find which permission check is failing
Linux can deny the write for more than one reason. The relevant identity is the user and group of the process that runs the test—not necessarily the user in your interactive shell or the owner of the host directory.
#1 Best Overall
- Intel Core i5-1335U Processor (12M Cache, 12 Threads, up to 4.6 GHz) - 256GB Solid State Drive - 16GB DDR4 SDRAM
- 15.6" FHD (1920x1080) Non-Touch Anti-Glare Display - Intel UHD 620 Integrated Graphics - Stereo Speakers
- 720p HD Webcam with Privacy Shutter. Integrated Microphone - Intel Dual Band Wireless-AC (2x2) 8265, Bluetooth Version 4.2
- I/O Ports: 2x USB 3.0, 1x USB 3.1 Type-C 3.1, Headphone/Mic Combo Port, 4-in-1 Card Reader, HDMI, Kensington Mini-Lock Slot
- Linux Mint (Cinnamon) 64-Bit - Keyboard with Full NumberPad - Fast Charging
| Destination case | What must be accessible | What to inspect |
|---|---|---|
| The PNG already exists | The process needs write access to that file, and search permission through every directory in its path. | File ownership and mode, effective user/group, and each parent directory. |
| The PNG does not exist | The process needs write access to the containing directory and search permission through every directory in the path. | Parent directory ownership and mode, effective user/group, and each path component. |
Linux’s open(2) documentation describes these as possible causes of EACCES; access(2) explains that directory search permission is needed along the path. See open(2) and access(2).
Inspect the path and runtime identity
Run checks in the same environment that launches Selenium. For a local test, inspect the user, the destination, and its directory:
id
ls -ld /tmp /tmp/selenium-output
ls -l /tmp/selenium-output/page.png
If the file is absent, the final command will report that; that is useful because it distinguishes a creation problem from a write-to-existing-file problem. For a different destination, substitute its actual path. To inspect path components, use namei -l /full/path/to/page.png where available, or inspect each directory in turn. Look for a component the test user cannot traverse.
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 →Rank #2
- Intel Core i5-10210U (up to 4.2GHz) - 1TB PCIe NVMe + 1TB HDD - 32GB DDR4 SDRAM
- 17.3" HD+ (1600x900) Display, Intel UHD Graphics 620
- Built in HD 720p Webcam with Microphone - Bluetooth Version4.2
- I/O Ports: 2x USB 3.1 (Data Only), 1x USB 2.0, 1x HDMI, 1x Headphone/Microphone Combo Jack
- Linux Mint Cinnamon 64-Bit - 6-Row Keyboard w/ Full Numberpad
Check containers and CI workers
A path that is writable on the host may be mounted into a container with different ownership, permissions, or identity. Likewise, a CI job may run as a service account. Check id and the mounted output directory from inside the container or job that runs the browser test; host-side permissions alone do not establish what that process can access.
Apply the smallest permission fix
Once you identify the failing check, correct ownership or grant only the access the test needs on the intended file or output directory. The appropriate change depends on whether the file already exists, who runs the test, and how the directory is shared. Avoid a blanket recursive chmod 777: it grants broad access without addressing the underlying ownership or path issue.
- Confirm the exact absolute destination and whether the PNG exists.
- Confirm the user and group of the Selenium process.
- Identify the specific file or directory permission that blocks writing or traversal.
- Change ownership or permissions narrowly for that target, following your system’s access policy.
- Run the screenshot test again and verify the file at the expected path.
Separate screenshot capture from saving to disk
Selenium also exposes screenshot data as bytes or base64. If you can retrieve the screenshot data but cannot write it to the desired destination, that points toward a local path or file-access problem rather than a failure to capture the browser window. Selenium’s Python API describes the file-saving method as saving the current window to a PNG and returning false on an I/O error; its screenshot methods are documented at the WebDriver API reference.
Rank #3
- [ULTRA-RUGGED DESIGN] MIL-STD-810G and IP65 certified. Built to survive 6-foot drops, heavy rain, and extreme vibrations. Features a magnesium alloy chassis with an integrated carry handle for maximum portability
- [4G LTE - WORK ANYWHERE] Integrated 4G LTE Multi-Carrier Mobile Broadband. Stay connected to the internet in remote areas or on the road without relying on Wi-Fi or phone hotspots. True mobile freedom for field professionals
- [1200-NIT SUNLIGHT READABLE] 13.1" XGA Touchscreen with CircuLumin technology. At 1200 nits, it is nearly 4x brighter than a standard laptop, ensuring perfect visibility under direct, intense sunlight
- [LINUX UBUNTU PRE-INSTALLED] Fast, secure, and bloatware-free. Optimized for developers, network engineers, and diagnostic software that thrives in a stable, open-source environment
- [LEGACY SERIAL PORT] Features a native RS-232 Serial Port, HDMI, and USB 3.0. Essential for connecting directly to industrial machinery, CNCs, and automotive diagnostic tools without unreliable adapter
Use a known writable destination as a diagnostic, then compare its permissions and path with the original. This is not a substitute for checking the original path: success elsewhere only narrows the problem to the destination or runtime environment.
Account for creation defaults when another process cannot read the PNG
If Selenium creates the file successfully but a later process cannot read it, inspect how new-file permissions are determined. The process’s umask removes permission bits from newly created files, and a default ACL on the parent directory can also affect the result. These are relevant to downstream access; they do not by themselves prove the cause of an initial screenshot write failure. See umask(2).
Troubleshoot common symptoms
save_screenshot returns False
Treat this as a failed file operation. Check the absolute path, whether the directory exists, whether the destination already exists, and whether the runtime user can write the file or its parent directory as applicable.
Rank #4
- THE POWER TO STAY PRODUCTIVE – Looking to make your everyday work and home life more manageable without breaking the bank? The Lenovo V15 Gen 4 offers long-term reliability with top-of-the-line features to make you your most productive self.
- CRUSH YOUR TO-DO LIST – The AMD Ryzen CPU pairs quiet performance and enhanced operating power to crush your high-demand workday. It optimizes performance and allows for seamless multitasking.
- TRUE-TO-LIFE VISUALS – The 15.6” FHD IPS display is anti-glare with 300 nits brightness to see your best outside or in. Its 88% screen-to-body ratio makes viewing detailed applications like spreadsheets a breeze.
- SEAMLESS COLLABORATION – Lenovo Smart Appearance enhances your camera effects to protect your privacy and to make you the focus of every video conference. Intelligent noise cancelation minimizes distraction and Dolby Audio provides an elegantly sonorous experience.
- BUILT TO WITHSTAND – Built for military-grade toughness, the V15 Gen 4 is tested to withstand harsh temperatures, pressure, humidity, vibrations and more. Keep your work safe from the board room to your living room and everywhere in between.
The path works in a shell but not in the test
The test may have a different working directory or user. Use an absolute path and inspect identity and permissions from the process environment that launches Selenium.
The output directory exists but saving is denied
Existence is not sufficient. The process may lack write access to the directory, search permission on an earlier directory, or write access to an existing PNG. Inspect the entire path and distinguish the existing-file case from new-file creation.
The Tool Desk
Outbyte Driver Updater FREEScan for outdated or missing drivers - takes under a minuteDriver Scan →Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →The file appears, but a later step cannot read it
Check the file’s resulting permissions, the process identities involved, and any umask or default ACL on the parent directory. Make the intended reader’s access explicit rather than widening permissions indiscriminately.
Best Value
- Powerful Linux Laptop: This IdeaPad Slim 3 Laptop comes pre-installed with Ubuntu Linux, offering fast performance, robust security, and a clean, user-friendly experience. Enjoy full customization, seamless hardware compatibility, and access to thousands of open-source apps. Whether you're working, creating, or coding, it's built to keep up with everything you do.
- A Multitasking Master: The latest AMD Ryzen 7 5825U processor (up to 4.5 GHz) delivers powerful performance with 8 cores and 16 threads for smooth multitasking. Integrated AMD Radeon Graphics provide crisp visuals for streaming, browsing, photo editing, and casual gaming. With smart machine intelligence, it adapts to your needs for a fast, responsive experience.
- 15.6" Full HD Display: The IdeaPad Slim 3 boasts an 88% screen-to-body ratio for a floating, edge-to-edge visual experience. TÜV Low Blue Light certification reduces eye strain, making it perfect for long work or study sessions.
- Military-Grade Durability: The smart IdeaPad Slim 3 combines portability and durability, letting you work, study, and play on the go. With a profile 10% slimmer than the previous generation, it's lightweight yet military-grade rugged, ready for anything, anywhere.
- Versatile Connectivity: Enjoy the security of a built-in webcam with a privacy shutter. Connect effortlessly with multiple ports: 2x USB A, 1x USB C, 1x HDMI, 1x SD Card Reader, 1x Headphone/Microphone combo. Bundle comes with Stylus Pen, 256GB Portable SSD and 5-in-1 Docking Station.
Or skip the browser setup
For a screenshot endpoint rather than a local Selenium browser, ScreenshotNeo accepts a URL in one GET request and can return an image or PDF. Its clean-shot flow accepts consent banners and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each step can be turned off. Bot checks, blank pages, timeouts, failed loads, and cache hits are not billed, with response headers identifying the page verdict and billing status. It also offers an MCP server with take_screenshot, get_page_info, and capture_pdf tools for AI agents.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
See the ScreenshotNeo documentation for API options. The Free plan includes 1,000 screenshots per month with no card; paid plans start at $5 for 3,000. Sign up for 1,000 free screenshots a month, with no card.
Frequently Asked Questions
What does `save_screenshot()` returning `False` mean?
Selenium documents `False` as the result when an I/O error prevents saving the screenshot.
Does Selenium’s screenshot file method save JPEG or WebP?
The documented file-saving method writes a PNG image; use a filename ending in `.png`.
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.




