Driver FixRecommendedSound, Wi-Fi or graphics acting up? Check drivers firstFind missing or outdated drivers fast.Check DriversOctober 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 desk6 min

How to Fix Chrome Headless Screenshots Returning a Blank Page in Selenium

A blank Selenium screenshot has several possible causes. Check the launched Chrome runtime, page readiness, DOM, viewport, and Headless implementation in a controlled sequence.

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.

A blank Selenium screenshot is a symptom, not a diagnosis. Check which Chrome binary and arguments actually launched, whether the page’s content was ready when you captured it, and whether your viewport includes that content. Change one variable at a time; neither --disable-gpu, --no-sandbox, nor a longer fixed delay is a universal fix.

Diagnose the blank screenshot in this order

  1. Record the runtime. Note Chrome, ChromeDriver, Selenium, operating system or container, launch arguments, and whether the page renders in headful mode. ChromeDriver recommends checking its log for the Chrome binary it launched, then trying that same binary with the same arguments outside WebDriver. This separates a startup or environment issue from one specific to the test harness. See ChromeDriver’s startup troubleshooting guide.
  2. Check page state immediately before capture. Record the current URL, title, and relevant DOM content. A completed navigation call does not prove that a single-page app or other dynamic content has finished rendering. Wait for a condition that represents the content your test needs, then take the screenshot.
  3. Set and verify the viewport. Pass an explicit window size and inspect the image dimensions and visible area. Chrome’s command-line screenshot controls include --window-size; ChromeDriver accepts Chrome arguments through ChromeOptions. A viewport mismatch can leave expected content outside the captured area, though setting a size is not a universal blank-image fix. See the Headless command-line reference and ChromeDriver capabilities.
  4. Compare the DOM with the pixels. If the DOM is empty or shows an interstitial or error page, investigate navigation, application readiness, and access from the test environment. If the expected DOM is present but the screenshot is blank, record that difference and try the same Chrome binary in headful mode. This is a diagnostic split, not proof of a particular root cause.
  5. Check which Headless implementation you are using. Current Headless shares Chrome’s implementation. Chrome 112 changed Headless so Chrome creates platform windows without displaying them. Since Chrome 132.0.6793.0, the old implementation is available only as the standalone chrome-headless-shell. Do not apply an old-mode workaround to current unified Headless without evidence. See Chrome Headless mode and the old and new Headless use cases.

Use a page-specific readiness condition

Do not treat “navigation completed” as equivalent to “the content I need is ready.” Identify an element, title, or other observable condition that indicates the target page has rendered the content under test. Selenium’s older official example waits for a title condition before taking a screenshot; adapt the condition to your application instead of copying an old example’s syntax as a universal recipe. The Selenium examples and FAQ illustrate that approach.

As an Amazon Associate I earn from qualifying purchases.

For example, if the page has a stable element with ID report-ready, wait for it to be visible before capturing:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.support.ui import WebDriverWait
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.common.by import By

options = Options()
options.add_argument("--headless")
options.add_argument("--window-size=1440,1000")

driver = webdriver.Chrome(options=options)
try:
    driver.get("https://example.com/report")
    WebDriverWait(driver, 20).until(
        EC.visibility_of_element_located((By.ID, "report-ready"))
    )
    print("URL:", driver.current_url)
    print("Title:", driver.title)
    print("Ready element:", driver.find_element(By.ID, "report-ready").text)
    driver.save_screenshot("screenshot.png")
finally:
    driver.quit()

Replace the example URL and selector with the page and readiness signal your test actually requires. If no single element indicates readiness, wait for an application-specific state or content change. A fixed sleep can mask timing variability; use it only when the application provides no better observable signal, and treat it as a diagnostic rather than a guaranteed solution.

#1 Best Overall
Philips 24 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 241V8LB
  • 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

Set the capture area explicitly

Chrome’s Headless CLI documents --screenshot, --window-size, and --timeout. The timeout is a maximum wait in milliseconds before capture, even if the page is still loading; it does not establish that your application’s content is ready. The CLI is useful for isolating Chrome behavior outside Selenium:

chrome --headless --window-size=1440,1000 --screenshot=screenshot.png https://example.com

Use the Chrome binary found in ChromeDriver’s log and retain the arguments from the failing run when reproducing. If you need a bounded CLI wait, add a timeout in milliseconds, for example --timeout=10000; choose a value appropriate to the page and remember that a timeout is not a page-specific readiness check. Selenium’s equivalent control is an explicit Chrome window-size argument, as in the Python example above.

Rank #2
Philips 22 Inch Computer Monitor FHD 100Hz VA VESA Flicker-Free, 221V8LB
  • 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

ChromeDriver creates a temporary profile for each session by default. Its capabilities documentation also describes selecting a Chrome binary and setting user-data-dir. These controls can help determine whether the selected binary or profile-dependent state differs between runs, but the documentation does not identify either setting as a general fix for blank screenshots.

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

Compare configurations without confounding the result

Run controlled comparisons and save the ChromeDriver log, screenshot dimensions, and observations for each. Change only one factor at a time:

Rank #3
Dell 24 Monitor - SE2426H - 23.8-inch FHD (1920x1080) 144Hz 1ms Display, in-Plane Switching (IPS) Technology, AMD FreeSync™, TÜV 3-Star 2X HDMI, Tilt
  • 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.
  • Headful Chrome versus current unified Headless.
  • Chrome, ChromeDriver, and Selenium versions, plus the actual Chrome binary in use.
  • Capture immediately after navigation versus capture after a meaningful page-specific readiness condition.
  • The default viewport versus an explicit window size.
  • If deliberately testing it, the standalone old chrome-headless-shell versus unified Headless. Identify the shell clearly rather than treating it as the current default.

These comparisons help isolate a cause; they are not benchmark results or a promise that a particular configuration will resolve the issue.

Use flags cautiously

Do not add flags simply because they appear in unrelated CI recipes. The legacy Headless FAQ says --disable-gpu is only needed as a temporary workaround on Windows and is not generally required on other platforms. ChromeDriver warns that using --no-sandbox to work around running as root is unsupported and highly discouraged; where possible, run Chrome as a regular user. Neither flag is an evidence-based universal remedy for a blank screenshot. See the Headless FAQ and ChromeDriver troubleshooting guidance.

Rank #4
Sale
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor | 100Hz, Game Mode, Advanced Eye Comfort, HDMI and D-sub Ports (LS27D366GANXZA)
  • 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
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot by symptom

What you observe What to check next
The current URL or title is unexpected. Inspect navigation, redirects, access restrictions, and the ChromeDriver log. Reproduce with the same binary and arguments outside WebDriver.
The DOM lacks the expected content. Wait for an application-specific ready condition; check whether the page is still loading or has rendered an interstitial or error page.
The DOM contains the content, but the image looks blank. Save the URL, title, relevant DOM details, image dimensions, and launch arguments. Compare the same binary in headful mode and check whether the content falls outside the viewport.
The screenshot is the wrong size or omits visible content. Set an explicit window size and inspect the resulting image dimensions and captured area.
The failure appears only in a container or CI. Record the OS or container, Chrome and driver versions, actual binary, arguments, and logs. Do not assume adding --no-sandbox or Xvfb is the right fix; isolate the runtime difference first.
The fix depends on an old Headless flag or shell. Confirm whether the test is using unified Headless or the standalone old chrome-headless-shell; they are not interchangeable descriptions of the current default.

Or skip the browser setup

If your goal is to obtain a screenshot rather than debug Selenium, ScreenshotNeo is a website screenshot API and MCP server for developers. One GET request returns a PNG, JPEG, WebP, or PDF. Its clean-shot flow accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups, and chat widgets; each step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits cost nothing, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients.

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.

The following cURL request captures a page as WebP. Replace the example URL and supply your API key. See the ScreenshotNeo documentation for parameters and response details.

curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

The free plan includes 1,000 screenshots per month with no card required; paid plans start at $5 for 3,000. Sign up for ScreenshotNeo’s free plan.

Best Value
Sale
Sceptre New 22-Inch Gaming Monitor, FHD 1080p, Up to 144Hz, HDMI, DisplayPort, Built-in Speakers, Machine Black (E225W-FW144 Series, 2026)
  • 【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.

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 *

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
PC Slower Than It Used to Be?Free scan - under a minute
Outdated Drivers Are Slowing You DownFree scan - exact matches

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.