To make Chrome Headless wait before it captures a page, add the millisecond --timeout flag: chrome --headless --screenshot --timeout=5000 https://example.com/. This permits up to five seconds of real elapsed time before the screenshot is taken. If you omit both --timeout and --virtual-time-budget, Headless captures as soon as the page is loaded.
The correct wait depends on what the page must finish: a fixed delay is useful for a predictable animation, while a script that waits for a specific element or application state is safer for dynamic sites. Chrome’s virtual-time option is a different mechanism: it fast-forwards JavaScript timers rather than making the process sleep for the same amount of wall-clock time.
Use --timeout for a real-time delay
Chrome Headless measures the --timeout value in milliseconds. A value of 5000 means five seconds:
chrome --headless --screenshot --timeout=5000 https://example.com/
Chrome applies this option to Headless screenshots, DOM dumping and PDF printing. The command loads the URL, waits for the requested real-time interval (up to the specified duration), and then performs the capture.
Free tools Windows power users keep installed
One-click scans. No signup required.
#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.
Choose an output filename and format
By default, Chrome writes a screenshot file in the current directory. You can specify a path and use a format supported by your Chrome build:
chrome --headless --screenshot=page.png --timeout=5000 https://example.com/
Use a URL with a trailing slash when you want to avoid ambiguity, and quote URLs containing shell metacharacters:
chrome --headless --screenshot='page.png' --timeout=7500 'https://example.com/products?view=grid&sort=price'
What the delay does not guarantee
A five-second timeout is not a promise that every network request, animation or application task has completed. It is simply a maximum real-time wait before capture. A slow API, a blocked request or an animation longer than the chosen interval can still produce an incomplete image. Select the value from the page’s behavior rather than treating five seconds as universal.
Real time versus virtual time
| Option | What advances | Best use | Important limitation |
|---|---|---|---|
--timeout=5000 |
The actual process waits up to 5,000 milliseconds. | Pages that need real time for rendering, network responses or human-like pacing. | The page may still be unfinished when the interval ends. |
--virtual-time-budget=5000 |
Chrome fast-forwards page timers as though five seconds elapsed. | Deterministic code driven by setTimeout or setInterval. |
It is not five seconds of wall-clock waiting and is not a general substitute for network waiting. |
Real elapsed waiting
Use --timeout when a page depends on actual time passing. This includes a client-side render that begins after load, a transition that must visibly progress, or a service that needs time to return remote data.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
chrome --headless --disable-gpu --screenshot=delayed.png --timeout=10000 https://example.com/
The value is in milliseconds: 1000 is one second, 10000 is ten seconds, and 60000 is one minute. Very long values make failures slow to diagnose, so keep a command-line delay bounded.
Fast-forwarding JavaScript timers
--virtual-time-budget makes time-dependent page code run as if the budget had elapsed. Chrome for Developers describes virtual time as a “fast-forward” for code such as setTimeout and setInterval. For example:
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.
chrome --headless --screenshot=timer.png --virtual-time-budget=5000 https://example.com/
This can make timer-driven demos reproducible without waiting five real seconds. It should not be used as a blanket replacement for --timeout when the page relies on external network activity, real-time services or behavior outside JavaScript timers.
When a fixed delay is the wrong wait
Fixed sleeps are easy to add but inherently approximate. If you know the element or state that marks readiness, automation code can wait for that condition and capture immediately afterward. This avoids both an unnecessarily long delay and a screenshot taken before the required content appears.
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 →Examples of readiness signals
- A results container exists and contains rows.
- A loading spinner is hidden or removed.
- A specific image has completed loading.
- An application adds a class such as
readyto its root element. - A network-driven status changes from “Loading” to “Complete.”
Use a fixed timeout as a fallback when there is no reliable signal, and combine it with a bounded overall navigation timeout in production. A readiness condition should be specific to the page; a generic selector such as body usually becomes true too early.
Puppeteer: wait in JavaScript, then capture
Puppeteer exposes screenshot capture through page.screenshot(). Install it in a project, launch a browser, navigate, wait, and write the image:
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch({headless: true});
try {
const page = await browser.newPage();
await page.goto('https://example.com/', {waitUntil: 'load'});
await new Promise(resolve => setTimeout(resolve, 5000));
await page.screenshot({path: 'screenshot.png', fullPage: true});
} finally {
await browser.close();
}
})();
The promise resolves after five real seconds. For a page-specific condition, replace the sleep with a selector wait:
await page.waitForSelector('.results-loaded', {timeout: 30000});
await page.screenshot({path: 'results.png'});
A selector wait is generally more meaningful than guessing a duration, but it can fail if the site changes its markup. Keep a timeout on the condition so a missing element does not leave a worker running indefinitely.
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.
Playwright: use a page wait before the screenshot
Playwright’s Page API provides screenshot capture and a page wait method. A minimal Node.js example is:
const {chromium} = require('playwright');
(async () => {
const browser = await chromium.launch({headless: true});
try {
const page = await browser.newPage();
await page.goto('https://example.com/', {waitUntil: 'load'});
await page.waitForTimeout(5000);
await page.screenshot({path: 'playwright.png', fullPage: true});
} finally {
await browser.close();
}
})();
Check the Playwright version in your project before relying on fixed sleeps in a production workflow. When possible, wait for a locator or application assertion instead:
await page.locator('.results-loaded').waitFor({state: 'visible', timeout: 30000});
await page.screenshot({path: 'results.png'});
shot-scraper: use its millisecond wait option
The shot-scraper command-line tool documents --wait INTEGER for delaying capture. For a five-second wait:
shot-scraper https://example.com/ --wait 5000 -o shot.png
As with Chrome’s timeout, the number is milliseconds and the interval is fixed. Use the tool’s page-specific or scriptable features if the target exposes a better readiness condition.
Delay choices by workload
| Workload | Starting approach | Why |
|---|---|---|
| Static HTML with a short visual transition | --timeout=1000 to --timeout=3000 |
Allows the transition to begin or finish without a large delay. |
| Client-rendered page with known ready element | Puppeteer or Playwright selector wait | Captures when the required state exists rather than after an arbitrary sleep. |
| Timer-based demonstration | --virtual-time-budget |
Advances timer-driven code quickly and repeatably. |
| Remote API or unpredictable third-party content | Scripted condition plus bounded timeout | Separates readiness from a maximum time allowed for a failed request. |
| One-off shell capture | Chrome --timeout |
No automation project is required. |
Troubleshoot an early, blank or inconsistent image
The screenshot is taken before content appears
Increase the real-time --timeout temporarily to establish whether the issue is timing. If the page has a reliable marker, move to Puppeteer or Playwright and wait for that selector or state. A longer fixed delay cannot repair a script error or a permanently failed request.
The virtual-time command still shows missing remote data
Replace --virtual-time-budget with a real --timeout, or use scripted navigation and a readiness condition. Virtual time advances page timers; it does not make an unavailable server respond.
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 output is completely blank
Check the URL from the same machine, confirm that the process can resolve DNS and reach the site, and inspect the page outside Headless. A blank result can come from a failed navigation, a page that requires interaction, a rendering error or a capture taken before client-side content is mounted. Add diagnostics in an automation script and keep the screenshot step after navigation succeeds.
The command appears to hang
Use a finite timeout rather than an unbounded script sleep, and set navigation and selector timeouts in automation. Close the browser in a finally block so failures do not leave orphaned processes. Also verify that the URL is quoted correctly and that the Chrome executable you invoke is the version you intended.
PC 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 & 11Crashes, 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 minuteThe page changes between runs
External data, ads, animations and A/B tests can make a fixed-time capture nondeterministic. Disable or control those sources where your workflow permits, wait for a stable application state, and choose a consistent viewport and user agent. Do not assume that the same millisecond value produces identical content on every site.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Performance, reliability and cost considerations
Every real-time delay adds latency to each capture. At scale, a five-second wait multiplied across hundreds of pages consumes substantially more worker time than a selector wait that completes as soon as the page is ready. Conversely, an interval that is too short creates retries and unusable images, which can cost more overall. Measure the page’s own readiness behavior and set a maximum for pathological cases.
Virtual time can reduce wall-clock duration for timer-only pages, but it is unsuitable when correctness depends on real network or real-time behavior. For reliable jobs, record the URL, browser version, selected wait strategy and failure reason so an intermittent image can be reproduced. The available Chrome documentation does not establish a first Chrome release for these exact behaviors, so verify flags against the Chrome version deployed in your environment.
Or skip the browser setup
ScreenshotNeo provides a website screenshot API and MCP server when you do not want to maintain a Headless Chrome process. One GET request returns a PNG, JPEG, WebP or PDF. Before capture, it accepts cookie or consent banners like a visitor and removes more than 60 known consent platforms, newsletter popups and chat widgets; each cleanup step can be turned off.
Quick wins for a faster PC:
Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →Only clean shots are billed. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads and cache hits cost nothing, and the response identifies the result with X-Page-Verdict and X-Billed headers. Its MCP server supplies take_screenshot, get_page_info and capture_pdf tools for Claude, Cursor and other MCP clients.
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.
Use the API documentation at https://screenshotneo.com/docs/ for authentication and options. This cURL request captures Stripe after ScreenshotNeo’s own page processing:
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)
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}`);
ScreenshotNeo includes full-page capture with lazy images loaded, selector-based element capture, dark mode, 12 device presets and custom viewports, retina scale, custom CSS and JavaScript, click-before-capture, selector waits, delay or network-idle waits, request and resource blocking, custom headers and cookies, user-agent and authorization settings, timezone and geolocation, transparent backgrounds, resizing, selectable cache TTLs, signed links, asynchronous jobs with signed webhooks, bulk capture of up to 100 URLs per call, a usage API and an OpenAPI specification. Parameter names used by other screenshot APIs also work, which can simplify migration.
The Free plan includes 1,000 shots per month with no card. Paid plans start at $5 for 3,000 shots; Growth is $15 for 15,000, Pro is $39 for 60,000, Scale is $99 for 250,000 and Business is $249 for 1,000,000. Yearly billing gives two months free, and every feature is available on every plan. Sign up free to get 1,000 screenshots a month without adding a card.
Frequently Asked Questions
Does --timeout wait before navigation starts?
No. It is the Headless capture wait applied after the page-loading process begins; it is not a replacement for a navigation or network timeout in an automation framework.
Can I use seconds instead of milliseconds?
No. Chrome’s --timeout, --virtual-time-budget and shot-scraper’s --wait values are expressed in milliseconds.
Which approach is best for a page that has no stable selector?
Use a bounded real-time delay, validate the resulting image, and add failure diagnostics. If the page can be changed, adding a reliable readiness marker is more robust than continually increasing the delay.
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.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Fix the driver behind crashes, sound loss and screen glitches3Repair Windows errors before they cause bigger problems

