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

For a Playwright browser navigation, set a finite timeout in milliseconds on page.goto, for example await page.goto(url, { timeout: 30_000 }). If captures share the same policy, configure a default navigation timeout instead. A navigation timeout does not automatically set the timeout for clicks, direct HTTP requests, or an entire test or capture job; configure the layer that is actually timing out.

Choose the timeout for the operation that is failing

“Website capture request” can mean several different operations. A browser may be navigating to a page, waiting for a click to finish, or making a direct HTTP request. A test runner or hosted capture service may also enforce an outer job limit. These limits have different scopes: changing one does not necessarily change the others.

Operation Where to configure it What it bounds
One browser navigation The timeout option on page.goto That navigation call
Repeated browser navigations A page or browser-context navigation default Navigations using that page or context
Playwright Test navigation or action navigationTimeout or actionTimeout in test configuration The corresponding navigation or action operation
Direct HTTP request The request API’s own timeout option That request operation
Whole test or capture job The test runner or capture service’s overall limit The complete run or job, subject to that system’s rules

Playwright’s documented timeout options accept 0 to disable the relevant timeout. That can leave a stalled operation waiting indefinitely, so use it only when an unbounded wait is intentional.

Set a timeout for one Playwright navigation

Pass timeout in milliseconds to page.goto. The following TypeScript example uses 30,000 ms (30 seconds) and waits for the DOM to be parsed before continuing:

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.
#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
const response = await page.goto(targetUrl, {
  timeout: 30_000,
  waitUntil: 'domcontentloaded',
});

if (!response) {
  throw new Error(`Navigation did not return a response for ${targetUrl}`);
}

The numeric value is an example, not a universal recommendation or guarantee. Playwright’s documentation uses 30,000 ms in examples; that does not show that 30 seconds is optimal for every site. Choose a limit from the latency and failure records for your own capture workflow, and keep an overall job budget in mind.

The waitUntil option answers a different question from timeout: it selects the navigation event at which Playwright considers the navigation complete, while the timeout caps how long the operation may wait. Page navigation options include commit, domcontentloaded, load, and networkidle. Pick the event that matches what your screenshot needs; for example, reaching domcontentloaded does not itself prove that a client-rendered chart or image is ready.

Set a page or context default

For a sequence of captures with the same navigation policy, set a default rather than repeating the option on every call:

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
// Page-level default
page.setDefaultNavigationTimeout(30_000);

// Or configure the browser context before creating pages
context.setDefaultNavigationTimeout(30_000);

await page.goto(targetUrl, { waitUntil: 'domcontentloaded' });

Use a per-call value when a particular destination needs an exception. Prefer one consistent default when a run shares the same expectations, and make exceptions explicit so they are easy to review.

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

Configure Playwright Test navigation and action timeouts

In a Playwright Test project, navigation and action limits are separate settings. For example:

import { defineConfig } from '@playwright/test';

export default defineConfig({
  use: {
    actionTimeout: 10_000,
    navigationTimeout: 30_000,
  },
});

Here, the documented example values are 10,000 ms for actions and 30,000 ms for navigation. They are configuration examples, not measured page speeds or a standard that every project should adopt. A test-level timeout is another, outer limit. Set that overall budget long enough to contain the navigations and actions the test performs, plus any other work; otherwise the test can end even when an individual operation’s own limit has not expired.

Rank #3
Sale
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.

If a test fails with a timeout, identify which operation’s error is reported before changing configuration. Raising the test timeout will not necessarily fix an action timeout; raising the navigation timeout will not necessarily fix a whole-test limit.

Set a timeout for direct HTTP requests separately

If your capture workflow fetches a URL through Playwright’s APIRequestContext, set the timeout on that request API. Browser navigation defaults such as page.goto do not configure an unrelated direct request.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
const response = await request.get(targetUrl, {
  timeout: 30_000,
});

if (!response.ok()) {
  throw new Error(`Request failed with HTTP ${response.status()}`);
}

Use the request method and options supported by the version of Playwright installed in your project. If a third-party screenshot service is doing the capture, its own request or job limits apply; Playwright settings in your local code cannot be assumed to change those limits.

Rank #4
Samsung 27" Essential S3 (S36GD) Series FHD 1800R Curved Computer Monitor
  • 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

Choose a readiness condition as well as a limit

A longer timeout gives an operation more time to reach its chosen completion condition; it does not make the page ready sooner or guarantee that the screenshot will contain the content you need.

  • commit waits for the response to be received and the document to start loading.
  • domcontentloaded waits for the initial HTML to be parsed. It may suit pages where the capture needs the initial document but not every resource.
  • load waits for the page’s load event, which includes dependent resources that participate in that event.
  • networkidle waits for a period with no network connections. Playwright labels this condition discouraged for tests and advises using web assertions to assess readiness instead.

For a page whose important content appears after navigation, wait for a meaningful selector or assert on the expected content rather than assuming that a navigation event proves the page is ready. For example:

await page.goto(targetUrl, {
  timeout: 30_000,
  waitUntil: 'domcontentloaded',
});

await page.locator('[data-capture-ready="true"]').waitFor({
  state: 'visible',
  timeout: 10_000,
});

Replace the selector with one that actually identifies readiness on your page. If there is no stable marker, decide what content or state the capture requires and use an assertion or a targeted wait that checks it.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Best Value
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.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshoot a timed-out capture

  • The error names page.goto. Check the navigation’s timeout and waitUntil condition. If the page reaches the required navigation event but a later element never appears, wait for that element separately.
  • A click or other interaction times out. Check the action timeout and whether the target is present, visible, enabled, and interactable. A navigation timeout does not cover every action.
  • The navigation succeeds but the test still times out. Check the Playwright Test overall timeout and the remaining work in the test. Increasing a per-navigation limit alone cannot extend the total test budget.
  • An API request times out while the page navigation setting looks correct. Configure the timeout on the direct request API that made the request; it is a separate operation.
  • The page loads but the screenshot is incomplete. Reconsider the readiness condition. A navigation event may occur before client-rendered content, delayed images, or other capture-critical elements are ready. Wait for a relevant condition rather than simply increasing the navigation limit.
  • The operation waits indefinitely. Check whether its timeout was set to 0, which disables the documented timeout. Restore a finite value if an unlimited wait was not deliberate.
  • A hosted screenshot job fails despite local Playwright changes. Check the provider’s own request and job limits. A browser setting in your code does not establish or override a third-party service’s limits.

Keep capture runs reliable and within budget

Do not use one large timeout as a substitute for understanding where time is spent. Keep navigation, actions, readiness waits, direct requests, and the overall job distinguishable in logs. Record the URL, operation, configured limit, elapsed time, and failure type so that slow destinations can be treated differently from broken selectors or stalled service requests.

Give each bounded operation a finite limit appropriate to its role, and ensure the enclosing test or job has enough time for the work it contains. If a workflow captures many pages, a very generous per-page limit can make a stuck page delay the entire run; a very short limit can reject a legitimately slow destination. There is no single optimal number established for all sites by the configuration examples above.

Or skip the browser setup

If you want a hosted screenshot instead of managing a browser, ScreenshotNeo accepts one GET request with a URL and returns a PNG, JPEG, WebP, or PDF. It is a screenshot API and MCP server for developers. See the ScreenshotNeo API documentation for request options.

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

r = requests.get(
    "https://api.screenshotneo.com/v1/shot",
    params={"access_key": "YOUR_API_KEY", "url": "https://example.com"},
    timeout=90,
)
open("shot.webp", "wb").write(r.content)
const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://example.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

The Python example’s 90-second timeout is the HTTP client’s wait limit in that example; it should not be read as a guarantee about ScreenshotNeo’s internal capture time. The service says which page verdict and billing outcome applied in its response headers. Cookie banners, newsletter popups, and chat widgets are removed before the shot; bot checks, blank pages, and failed loads are never billed. An MCP server lets AI agents use screenshot tools, and the free plan includes 1,000 screenshots a month with no card; paid plans start at $5 for 3,000.

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

Sign up for ScreenshotNeo’s free plan: 1,000 screenshots a month, no card required.

Frequently Asked Questions

Does changing `page.goto`’s timeout change how long a click can wait?

No. Navigation and action timeouts cover different operations. Set the action limit for a click or other action.

Is 30 seconds the right timeout for every website?

No. It is a documented example value, not a universal optimum. Choose a finite limit based on your workflow’s observed latency and failure records.

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.

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