Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.
A black Selenium screenshot does not identify one universal bug. Isolate the failure in this order: prove the page is ready, verify that Selenium wrote a fresh image, check the window size, compare headless and headful runs, confirm browser/driver compatibility, and then reproduce the same browser command in the CI or Linux environment. This workflow separates page timing, rendering, capture, driver, and operating-system problems instead of applying a random flag.
Start with a controlled capture
Before changing Chrome options, make one run that records exactly what happened. Use a new absolute PNG path, check the return value, and print the browser, driver, mode, and window dimensions. Opening an old file can look identical to a rendering failure.
from pathlib import Path
from datetime import datetime
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
out = Path("/tmp/selenium-shot-" + datetime.utcnow().strftime("%Y%m%d%H%M%S") + ".png")
options = Options()
options.add_argument("--headless=new") # remove for a headful comparison
options.add_argument("--window-size=1440,1000")
driver = webdriver.Chrome(options=options)
try:
driver.get("https://example.com")
WebDriverWait(driver, 30).until(
EC.visibility_of_element_located((By.TAG_NAME, "body"))
)
print("browser:", driver.capabilities.get("browserVersion"))
print("window:", driver.get_window_size())
ok = driver.save_screenshot(str(out))
print("saved:", ok, "file:", out, "bytes:", out.stat().st_size)
finally:
driver.quit()
A successful return and a non-zero file prove that WebDriver produced a file; they do not prove that the page rendered correctly. Inspect that exact path, and retain it with the run logs. If the dimensions are zero, unexpectedly tiny, or different from the requested viewport, fix geometry before investigating CSS or GPU behavior.
Do these 3 things before closing this tab:
1Fix the driver behind crashes, sound loss and screen glitches2Clear out junk files and repair common Windows errors3Scan for outdated or missing drivers - takes under a minuteMake page readiness explicit
Selenium’s troubleshooting guidance identifies poor synchronization as its most common Selenium-related error. A screenshot can be taken while navigation, JavaScript, fonts, images, or a client-side route is still changing. Treat a long sleep only as a diagnostic: if it changes the image, replace it with a condition that describes the state you actually need.
#1 Best Overall
- CRISP CLARITY: This 23.8″ Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
- WORK SEAMLESSLY: This sleek monitor is virtually bezel-free on three sides, so the screen looks even bigger for the viewer. This minimalistic design also allows for seamless multi-monitor setups that enhance your workflow and boost productivity
- A BETTER READING EXPERIENCE: For busy office workers, EasyRead mode provides a more paper-like experience for when viewing lengthy documents
Wait for a meaningful condition
- Wait for a distinctive application element to be visible, not merely for
get()to return. - For a dashboard, wait for the loading indicator to disappear and a chart or table to contain data.
- For a lazy page, scroll the required region and wait for its images or cards to appear.
- If a site exposes no reliable element, wait for a document value or application-specific JavaScript condition.
Keep the page URL, wait condition, timeout, and screenshot call constant while testing other variables. That makes each comparison meaningful.
Compare headless and headful Chrome correctly
Run one headful capture and one headless capture with the same browser version, URL, wait condition, viewport, and screenshot method. Change only the headless setting. If only one mode is black, collect logs and investigate that path; do not assume that switching modes is a permanent cure.
Current Chrome uses a unified headless implementation. Chrome 112 changed headless so Chrome creates platform windows without displaying them, while retaining normal browser functions. From Chrome 132.0.6793.0, the old implementation is distributed separately as the chrome-headless-shell binary. Therefore, verify which Chrome binary your runner actually starts rather than relying on historical advice about an entirely separate headless browser.
For a headful diagnostic, remove --headless=new and run where a display is available. In a Linux service or CI job without a display, use the runner’s supported virtual-display arrangement rather than guessing at flags.
Verify Chrome, ChromeDriver, and options
Selenium’s Chrome documentation says the browser and ChromeDriver major versions should match. Record both versions from the failing run; do not infer them from a locally installed browser that the runner may not use. Also record the binary path and every Chrome option.
Rank #2
- CRISP CLARITY: This 22 inch class (21.5″ viewable) Philips V line monitor delivers crisp Full HD 1920x1080 visuals. Enjoy movies, shows and videos with remarkable detail
- 100HZ FAST REFRESH RATE: 100Hz brings your favorite movies and video games to life. Stream, binge, and play effortlessly
- SMOOTH ACTION WITH ADAPTIVE-SYNC: Adaptive-Sync technology ensures fluid action sequences and rapid response time. Every frame will be rendered smoothly with crystal clarity and without stutter
- INCREDIBLE CONTRAST: The VA panel produces brighter whites and deeper blacks. You get true-to-life images and more gradients with 16.7 million colors
- THE PERFECT VIEW: The 178/178 degree extra wide viewing angle prevents the shifting of colors when viewed from an offset angle, so you always get consistent colors
Turn on ChromeDriver logging
Direct ChromeDriver logs to a file and inspect startup messages for the binary, arguments, crashes, and session creation. A minimal Python setup is:
from selenium.webdriver.chrome.service import Service
service = Service(log_output="/tmp/chromedriver.log")
driver = webdriver.Chrome(service=service, options=options)
If Chrome and ChromeDriver have different major versions, install a compatible pair or let Selenium Manager resolve it when your project permits. Selenium Manager ships with Selenium releases; when no driver is supplied, it can discover the installed browser, download a compatible driver, and cache it. That reduces manual driver drift, but it is not a guarantee against a rendering defect.
Recommended Free Tools
Check the screenshot API and geometry
Selenium exposes screenshots as a PNG file, raw bytes, or base64 data. Test one method at a time and verify the result:
png = driver.get_screenshot_as_png()
print("bytes:", len(png), "size:", driver.get_window_size())
Path("/tmp/current.png").write_bytes(png)
Use get_window_size() immediately before capture. Set a deterministic size with set_window_size(width, height) or --window-size. A viewport that is far smaller than expected can make a mostly empty page appear black, while an old output file can hide a successful new capture. Confirm the file timestamp, byte count, and image dimensions with your normal image tooling.
Test another browser to locate the failing layer
Run the same URL, readiness condition, viewport, and output code in Firefox or another supported browser. Selenium recommends trying multiple browsers because reported errors often originate in the underlying browser driver. If Firefox is correct and Chrome is black, focus on Chrome, ChromeDriver, its binary, and its arguments. If every browser is black, prioritize page state, output handling, and the execution environment.
Rank #3
- Clear visuals. Fluid motion: A 144Hz refresh rate and 1ms MPRT deliver smooth, tear‑free motion across work, gaming, and streaming for clearer, more fluid viewing.
- Eye comfort: TÜV Rheinland 3‑star* certification reduces harmful blue light while preserving stunning color quality without compromise. *TÜV Rheinland 3-star eye comfort certification.
- Wide viewing angle: Get consistent views across a wide 178° /178° viewing angle.
- In-Plane Switching (IPS): See excellent color accuracy and consistency across wide viewing angles with In-plane Switching (IPS) technology.
- Ultra-thin bezels: Maximize your viewing experience with thin bezels.
Keep a small matrix in your run artifacts:
| Variable | Record | Comparison rule |
|---|---|---|
| Browser | Name and full version | Change only the browser when comparing engines |
| Driver | Name and version | Check Chrome major-version matching |
| Mode | Headless or headful | Keep URL, wait, viewport, and capture method fixed |
| Window | Width and height returned by WebDriver | Use the same dimensions in each run |
| Environment | Local, CI, container, or service | Reproduce in the environment where it fails |
Reproduce outside WebDriver in CI or Linux
If the symptom appears only in a runner, container, or service, launch the same Chrome binary directly with the same command-line switches in that environment. ChromeDriver recommends this test to determine whether Chrome itself starts correctly. Preserve the resulting startup logs.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Repair Windows errors before they cause bigger problemsFix Now →Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Do not make --no-sandbox the default fix
ChromeDriver identifies running Chrome as root on Linux as a common startup-crash cause. Its documentation calls the --no-sandbox workaround unsupported and highly discouraged. Configure the job to run Chrome as a regular user, correct the container’s user and writable directories, and then retry. A black image after a successful session still requires the readiness, geometry, and browser/driver checks above.
Common symptoms and targeted fixes
The file is unchanged or from an earlier run
Use a unique absolute filename, print its timestamp and byte count, and open that exact file. Check the boolean returned by save_screenshot or the length of returned bytes.
The image changes after an arbitrary sleep
Replace the sleep with an explicit wait for the element, loading state, or application condition that became ready. Keep the timeout finite and capture the page-source or logs when the wait expires.
Headful works but headless is black
Hold every other variable constant, confirm the actual Chrome version and binary, and inspect ChromeDriver logs. Compare with the current unified headless mode; do not switch to the old shell unless your Chrome distribution explicitly provides and requires it.
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 →Rank #4
- CURVED FOR ENHANCED ENGAGEMENT: An immersive viewing experience with a curved monitor that wraps more closely around your field of vision; It creates a wider view, enhancing depth perception and minimizing peripheral distraction
- SMOOTH PERFORMANCE FOR SEAMLESS CONTENT: Stay in the action when playing games, watching videos, or working on creative projects; The 100Hz refresh rate reduces lag and motion blur so you don't miss a thing in fast-paced moments¹
- MORE GAMING POWER: Gain the edge with optimizable game settings; Color and image contrast can be adjusted to see scenes more vividly and spot enemies hiding in the dark; Game Mode adjusts any game to fill the screen so you can view every detail²
- KEEP IT EASY ON THE EYES: Care for your eyes and stay comfortable, even during long sessions; Advanced eye comfort technology certified by TÜV reduces eye strain by minimizing blue light and reducing irritating screen flicker²
- INCREASED VERSATILITY: Connect to more; Plug devices straight into your monitor for increased flexibility, making your computing environment even more convenient
Only one browser fails
Collect that browser’s and driver’s versions, reproduce with the smallest page that demonstrates the problem, and check compatibility before changing application code.
Only CI or a container fails
Run the same Chrome command directly in that environment, verify the user is not root, confirm writable profile and temporary directories, and compare environment variables and command-line switches with the working local run.
Chrome crashes before a screenshot
Read the ChromeDriver log, confirm the binary path, and correct the browser/driver pair. A startup crash is different from a successfully captured black page.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Or skip the browser setup
For a service-based capture, ScreenshotNeo returns a screenshot or PDF with one HTTP request. It accepts the cookie or consent banner like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture; each cleanup step can be disabled. Only clean shots are billed: bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and every response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for Claude, Cursor, and other MCP clients.
Free tools Windows power users keep installed
One-click scans. No signup required.
Use the ScreenshotNeo documentation for authentication and options. A direct call is:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp
Python
import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
r.raise_for_status()
open("shot.webp", "wb").write(r.content)
Node.js
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);
if (!res.ok) throw new Error(`${res.status} ${res.statusText}`);
const fs = await import('node:fs/promises');
await fs.writeFile('shot.webp', Buffer.from(await res.arrayBuffer()));
ScreenshotNeo includes full-page capture with lazy images loaded, element capture by CSS selector, dark mode, 12 device presets plus custom viewports, retina scale, PDF paper size/margins/landscape/page ranges, custom CSS and JavaScript, pre-capture clicks, hidden selectors, waits for selectors/delays/network idle, request and resource blocking, custom headers/cookies/user agents/Authorization, timezone and geolocation, transparent backgrounds, resizing, selectable cache TTLs, signed public-image links, asynchronous jobs with signed webhooks, bulk capture for up to 100 URLs per call, a usage API, an OpenAPI specification, and compatible parameter names used by other screenshot APIs.
Best Value
- 【INTEGRATED SPEAKERS】Whether you're at work or in the midst of an intense gaming session, our built-in speakers provide rich and seamless audio, all while keeping your desk clutter-free.
- 【EASY ON THE EYES】 Protect your eyes and enhance your comfort with Blue-Light Shift technology. This feature reduces harmful blue light emissions from your screen, helping to alleviate eye strain during long hours of use and promoting healthier viewing habits.
- 【WIDEN YOUR PERSPECTIVE】Our sleek minimal bezel design ensures undivided attention. The nearly bezel-free display seamlessly connects in a dual monitor arrangement, delivering an unobstructed view that lets you focus on more at once, completely distraction-free.
| Plan | Allowance | Price |
|---|---|---|
| Free | 1,000 shots/month | No card |
| Starter | 3,000 | $5 |
| Growth | 15,000 | $15 |
| Pro | 60,000 | $39 |
| Scale | 250,000 | $99 |
| Business | 1,000,000 | $249 |
Yearly billing gives two months free, and every feature is available on every plan. If you want to avoid local browser and driver maintenance, start with 1,000 free screenshots a month and no credit card.
Reliability and cost considerations
- Use explicit waits and deterministic viewports so retries capture the same state.
- Keep browser, driver, operating-system, and Chrome arguments in build logs for reproducibility.
- Cache only when the page can safely be reused; otherwise a cached image can conceal a change.
- For high-volume jobs, asynchronous capture, webhooks, and bulk requests reduce orchestration overhead; inspect verdict and billing headers before treating a result as valid.
FAQ
Does a black screenshot prove Chrome is broken?
No. The same symptom can come from page timing, a stale or misread file, incorrect geometry, browser/driver behavior, or the CI environment. The controlled sequence identifies which layer differs.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Should I always add --no-sandbox on Linux?
No. ChromeDriver describes it as unsupported and highly discouraged. Run Chrome as a regular user and correct the environment instead.
Is current headless Chrome a separate browser?
Current headless and headful Chrome share the implementation; Chrome 132.0.6793.0 and later distribute the old implementation as a separate chrome-headless-shell binary.
Frequently Asked Questions
Can I diagnose the problem without changing my test application?
Yes. First keep the URL and test code fixed while recording a fresh output path, API result, dimensions, versions, and logs. Then vary one factor at a time: readiness wait, headless mode, browser, and execution environment.
What should I archive from a failed run?
Archive the exact image, its path and byte count, browser and driver versions, window dimensions, Chrome arguments, ChromeDriver log, operating-system/container details, and the page condition used before capture.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minutePC Slower Than It Used to Be?
A free scan shows the junk files, broken settings and background clutter dragging Windows down - then fixes them in one click.Free scan · Windows 10 & 11The Bottom Line
Fix black Selenium screenshots by isolating variables, not by adding a universal flag: wait for the real page state, verify a fresh file and viewport, compare headless/headful and another browser, match ChromeDriver majors, and reproduce the same command in CI as a regular user. If maintaining that browser stack is unnecessary, ScreenshotNeo provides a one-call capture path with clean-shot billing and an MCP server for AI agents.
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.

