Page Load Settings
Control when the screenshot is captured during page load. Some websites need more time to fully render content before capturing.Wait condition
ThewaitUntil parameter determines when to consider the page “loaded” before capturing:
| Condition | Description | Best For |
|---|---|---|
load | Wait for full page load event | Simple static pages |
domcontentloaded | Wait until HTML is fully parsed | Pages with fast rendering |
networkidle0 | Wait until no network connections (at least 0.5s) | Pages with minimal AJAX |
networkidle2 | Wait until at most 2 network connections (at least 0.5s) | Most pages (default) |
Using wait conditions
bash
Choosing the right condition
- networkidle2 (default) - Best for most websites. Waits for page to be mostly loaded.
- networkidle0 - Use for pages with minimal JavaScript or known tracking scripts.
- domcontentloaded - Use for fast-capturing when content renders quickly.
- load - Use only for simple, static pages without dynamic content.
Timeout
Thetimeout parameter sets the maximum wait time before aborting the screenshot.
| Value | Description |
|---|---|
| Minimum | 1000ms (1 second) |
| Default | 30000ms (30 seconds) |
| Maximum | 120000ms (120 seconds) |
Setting timeout
bash
When to adjust timeout
- Increase timeout for slow-loading pages, heavy content, or complex web applications
- Decrease timeout for fast, lightweight pages to fail quickly on errors
Combining settings
For complex pages, combine wait condition with custom timeout:bash
Troubleshooting
| Problem | Solution |
|---|---|
| Screenshot is blank/incomplete | Increase timeout or use networkidle2 |
| Screenshot takes too long | Use domcontentloaded or decrease timeout |
| Dynamic content not visible | Use networkidle0 or increase timeout |
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
waitUntil | string | networkidle2 | When to capture: load, domcontentloaded, networkidle0, networkidle2 |
timeout | number | 30000 | Maximum wait time in milliseconds (1000-120000) |
See also
- Full Page Screenshots - Capture entire page length
- Viewport Presets - Device sizes and dimensions