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 minuteConfigure the timeout for the thing that is actually waiting: Playwright Test gives each test 30 seconds by default, retrying assertions 5 seconds, and browser actions and navigation operations no timeout by default. These limits are separate. Use timeout for a test, expect.timeout for retrying assertions, use.actionTimeout or use.navigationTimeout for browser operations, and globalTimeout to cap the complete run. The examples below use Playwright Test and the current official documentation accessed October 3, 2026.
Set the timeout that matches the work
Playwright Test has several independent timeout scopes. Raising the test timeout will not, by itself, give an assertion a longer retry window or impose a limit on the whole run. Conversely, a longer assertion timeout does not extend the test’s total budget.
As an Amazon Associate I earn from qualifying purchases.
| What is limited | Suite or run setting | Narrow override | Default |
|---|---|---|---|
| Test, including its setup | timeout |
test.setTimeout(ms) or test.slow() |
30,000 ms (30 seconds) |
| Retrying assertion | expect.timeout |
Matcher option, such as toBeVisible({ timeout: ms }) |
5,000 ms (5 seconds) |
| Browser action | use.actionTimeout |
Operation option, such as locator.click({ timeout: ms }) |
No timeout |
| Navigation operation | use.navigationTimeout |
Operation option, such as page.goto(url, { timeout: ms }) |
No timeout |
| Complete test run | globalTimeout |
Set the run-level configuration | Disabled; no global limit |
| Individual fixture | Fixture definition’s timeout |
Set the fixture’s own timeout | Shares the test timeout by default |
Defaults and scope are from the Playwright Timeouts guide, TestConfig API, Assertions guide, and Page API.
Configure suite defaults
Put shared test, assertion, action, navigation, and run limits in playwright.config.ts. This example sets illustrative budgets; they are not universal recommended values.
#1 Best Overall
import { defineConfig } from '@playwright/test';
export default defineConfig({
// Each test gets two minutes.
timeout: 120_000,
// Auto-retrying assertions get ten seconds.
expect: {
timeout: 10_000,
},
// Per-action and per-navigation defaults.
use: {
actionTimeout: 10_000,
navigationTimeout: 30_000,
},
// Optional cap for the complete test run.
globalTimeout: 3_600_000,
});
The timeout setting applies to each test and includes the test function, fixture setup, and beforeEach. Teardown and afterEach receive a separate budget of the same value. The beforeAll and afterAll hooks have a separate timeout that defaults to the test timeout. See the official timeout guide for the scope details.
Change one test or hook
Give one test a larger budget
Call test.setTimeout() inside the test when its expected work genuinely needs more time:
import { test, expect } from '@playwright/test';
test('exports a large report', async ({ page }) => {
test.setTimeout(120_000);
await page.goto('/reports');
await page.getByRole('button', { name: 'Export' }).click();
await expect(page.getByText('Export complete')).toBeVisible();
});
test.slow() is shorthand for tripling the default test timeout. Use it when that convention is appropriate rather than duplicating a custom duration everywhere. The Playwright Test API documents these test-level controls.
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 →Rank #2
Extend the current timeout in a hook
From beforeEach, you can increase the current test’s budget relative to its existing timeout:
import { test } from '@playwright/test';
test.beforeEach(async ({}, testInfo) => {
testInfo.setTimeout(testInfo.timeout + 30_000);
});
beforeAll and afterAll can set their own timeout from within the hook. For exact behavior and the relevant methods, see the TestInfo API and Playwright Test API.
Set assertion, action, and navigation limits
Retrying assertions
Auto-retrying assertions have their own timeout, independent of the test budget. Set a suite default with expect: { timeout: ms }, as in the config example, or give one matcher a narrower limit:
await expect(page.getByRole('status')).toHaveText('Ready', { timeout: 10_000 });
This is useful when the required condition may take longer to become true. The assertion still needs to fit within the available test budget. The Assertions guide describes retrying assertions and their timeout option.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Actions and navigation
Set defaults in the config’s use object, or override only the operation that needs a different limit:
await page.getByRole('button', { name: 'Continue' }).click({ timeout: 15_000 });
await page.goto('https://example.com', { timeout: 45_000 });
Action and navigation operations have no timeout by default. A per-call timeout option lets a single click or navigation use a defined budget without changing the rest of the suite. The Page API also documents page- and browser-context-level default timeout methods; consult the Page API for those methods and their operation scope.
Rank #4
Limit a fixture or the whole run
Give a slow fixture its own budget
A fixture normally shares the test timeout. If fixture setup is the slow part and tests should retain a tighter limit, assign a timeout in the fixture definition instead:
import { test as base } from '@playwright/test';
export const test = base.extend({
preparedData: [async ({}, use) => {
const data = await prepareData();
await use(data);
}, { timeout: 60_000 }],
});
Use this when the setup work has a distinct, explainable budget; do not increase every test just to accommodate one fixture. The timeouts guide covers fixture-specific timeouts.
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 & 11Set a hard cap for the suite
globalTimeout caps the complete test run and is disabled by default. Set it in the config when a run-level ceiling is useful, for example in CI to prevent a broken or stalled suite from running indefinitely. In the earlier config, 3_600_000 means a one-hour cap; choose a value that fits the suite and environment rather than copying the example uncritically. Configuration is documented in the TestConfig API.
Diagnose timeouts instead of masking them
A timeout may be a symptom of a readiness or stability problem rather than an undersized budget. Playwright’s official guide cautions: “If you happen to be in this section because your tests are flaky, it is very likely that you should be looking for the solution elsewhere.”
- An assertion times out: check whether its condition accurately represents readiness and whether the page reaches that state. Increase the assertion timeout only when the expected wait is legitimate.
- An action or navigation appears stuck: inspect the specific operation and set its limit explicitly if it needs one. These operation timeouts have no default cap.
- The whole job runs too long: configure
globalTimeoutas a run-level safeguard; it is not a replacement for appropriate test and operation budgets. - A test is flaky: identify the unstable condition rather than raising all timeout values. For navigation, Playwright marks
networkidleas discouraged for testing and recommends web assertions to assess readiness.
For navigation readiness, prefer waiting for the user-visible or application state that establishes success, such as a retrying web assertion, rather than treating network quiet as proof. See the Page API and Assertions guide.
Or skip the browser setup
If your task is to capture a website rather than test browser behavior, ScreenshotNeo takes a screenshot with one GET request. Its API can remove cookie/consent banners, newsletter popups, and chat widgets before capture; each cleanup step can be turned off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed, and responses identify the page verdict and billing status in headers. Its MCP server provides take_screenshot, get_page_info, and capture_pdf tools for AI agents.
For a screenshot API key, see the ScreenshotNeo API documentation. This runnable cURL example saves the screenshot response:
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://example.com -o shot.webp
ScreenshotNeo includes 1,000 screenshots per month on its free plan with no card required; paid plans start at $5 for 3,000 screenshots. Sign up for ScreenshotNeo’s free plan.
Frequently Asked Questions
Does increasing Playwright’s test timeout also increase the assertion timeout?
No. The test and retrying-assertion timeouts are independent settings.
Are action and navigation timeouts unlimited by default?
They have no timeout by default; configure a default or a per-operation timeout when you need a limit.
Recommended Free Tools
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.




