A Playwright fixture timeout means work in fixture setup or teardown did not finish within the timeout that governs that lifecycle phase. Start by reading the complete error and call log, identify whether the stalled operation is fixture setup, test code, an assertion, a browser action/navigation, or a hook, then change only that matching timeout—or, preferably, fix the missing readiness signal.
Playwright documents a 30-second default test timeout, a 5-second default for auto-retrying expect assertions, no default global timeout, no default action or navigation timeout, and no default timeout for an individual fixture. These defaults are version-sensitive, so verify them against the documentation for the Playwright version in your project.
What a fixture timeout actually means
Fixtures are part of a test’s lifecycle. Playwright counts fixture setup and teardown time toward the test timeout unless the fixture has its own timeout. A fixture that starts a service, creates test data, logs in a user, or waits for application readiness can therefore consume the same budget as the test body.
Playwright’s timeout controls are separate. A longer test timeout does not automatically make assertions, actions, navigation, hooks, or every fixture wait longer. The right fix depends on the phase named by the error.
#1 Best Overall
- KEYBOARD: The keyboard works for Windows with hot keys that enable easy access to Media, My Computer, Mute, Volume up/down, and Calculator
- EASY SETUP: Experience simple installation with the USB wired connection
- VERSATILE COMPATIBILITY: This keyboard is designed to work with multiple Windows versions, including Vista, 7, 8, 10 offering broad compatibility across devices.
- SLEEK DESIGN: The elegant black color of the wired keyboard complements your tech and decor, adding a stylish and cohesive look to any setup without sacrificing function.
- FULL-SIZED CONVENIENCE: The standard QWERTY layout of this keyboard set offers a familiar typing experience, ideal for both professional tasks and personal use.
| Control | What it limits | Documented default | Typical scope |
|---|---|---|---|
| Test timeout | Test body and ordinary setup work | 30,000 ms | Config, test, or describe group |
| Expect timeout | Auto-retrying web assertions | 5,000 ms | Config or one assertion |
| Fixture timeout | A fixture’s setup and teardown | No individual-fixture default | Fixture tuple option |
| Action timeout | Operations such as click or fill | No default | Config or operation |
| Navigation timeout | Page navigation methods | No default | Config or navigation call |
| Hook timeout | beforeAll/afterAll work |
Defaults to test timeout | Hook or config |
| Global timeout | The complete test run | No default | Config |
The values above come from Playwright’s official timeout guidance and can change between releases.
Diagnose the stalled phase before changing a value
- Read the whole error and call log. Note whether it says fixture, test timeout, matcher, action, navigation,
beforeAll, orafterAll. Those labels point to different controls. - Separate setup from teardown. A fixture can fail before
use()(setup) or while disposing resources afteruse()(teardown). Teardown andafterEachreceive a separate timeout window of the same value after the test function finishes. - Find the last awaited operation. Look for network requests, process startup, authentication, database creation, readiness probes, or a locator/action that never reaches an actionable state.
- Reproduce one test. Run
npx playwright test path/to/test.spec.ts --debug. Playwright Inspector opens a headed browser, lets you step through the test, and sets the default timeout to zero for diagnosis. That zero setting is not a production recommendation.
Use the Inspector to locate the wait
Step through the fixture and test until the operation stops progressing. Inspect the actionability log for clicks, fills, and other locator actions. If the application becomes ready after a real event, capture that event or state rather than guessing a delay.
Fix a slow fixture with a fixture-scoped timeout
When setup is legitimately slower than ordinary tests, give only that fixture a larger budget. The tuple form keeps the exception local:
import { test as base } from '@playwright/test';
type Fixtures = {
seededUser: { id: string };
};
export const test = base.extend<Fixtures>({
seededUser: [async ({ request }, use) => {
const response = await request.post('/api/test-users', {
data: { role: 'admin' }
});
if (!response.ok()) {
throw new Error(`User creation failed: ${response.status()}`);
}
const user = await response.json();
await use(user);
await request.delete(`/api/test-users/${user.id}`);
}, { timeout: 60_000 }]
});
The 60_000 value is illustrative. Choose a limit based on the service’s reliable upper bound and keep the fixture’s cleanup inside the same lifecycle budget. Worker-scoped fixtures also have their own timeout; the fixture guide says that timeout defaults to the test timeout and can be changed in the fixture options.
Free tools Windows power users keep installed
One-click scans. No signup required.
Rank #2
- Reliable Plug and Play: The USB receiver provides a reliable wireless connection up to 33 ft (1), so you can forget about drop-outs and delays and you can take it wherever you use your computer
- Type in Comfort: The design of this keyboard creates a comfortable typing experience thanks to the low-profile, quiet keys and standard layout with full-size F-keys, number pad, and arrow keys
- Durable and Resilient: This full-size wireless keyboard features a spill-resistant design (2), durable keys and sturdy tilt legs with adjustable height
- Long Battery Life: MK270 combo features a 36-month keyboard and 12-month mouse battery life (3), along with on/off switches allowing you to go months without the hassle of changing batteries
- Easy to Use: This wireless keyboard and mouse combo features 8 multimedia hotkeys for instant access to the Internet, email, play/pause, and volume so you can easily check out your favorite sites
Make fixture readiness deterministic
- Wait for a health endpoint or a process-ready event, not an arbitrary sleep.
- Check every network response and fail with its status and body when setup cannot complete.
- Use unique data and deterministic cleanup so retries do not inherit broken state.
- Keep expensive one-time work in a worker-scoped fixture only when sharing it is safe for parallel tests.
Increase the test timeout only when total test work is longer
Use the test timeout when the combined setup, test body, and normal per-test work genuinely needs more time. In playwright.config.ts:
import { defineConfig } from '@playwright/test';
export default defineConfig({
timeout: 45_000
});
For a single test, use test.setTimeout:
test('imports a large dataset', async ({ page }) => {
test.setTimeout(90_000);
// test steps
});
For a group, use test.describe.configure:
test.describe.configure({ timeout: 60_000 });
test.describe('long-running import flow', () => {
// tests in this group
});
Do not raise the suite-wide value merely because one fixture is slow. A broad increase delays feedback and can conceal a deadlock or failed readiness check.
Fix assertion timeouts separately
Auto-retrying assertions have a separate default of 5,000 ms. If the error is attached to an expect matcher, change the assertion budget—not the test timeout:
await expect(page.getByRole('status'))
.toHaveText('Ready', { timeout: 15_000 });
Set a suite default only when the application consistently needs it:
Rank #3
- All-day Comfort: The design of this standard keyboard creates a comfortable typing experience thanks to the deep-profile keys and full-size standard layout with F-keys and number pad
- Easy to Set-up and Use: Set-up couldn't be easier, you simply plug in this corded keyboard via USB on your desktop or laptop and start using right away without any software installation
- Compatibility: This full-size keyboard is compatible with Windows 7, 8, 10 or later, plus it's a reliable and durable partner for your desk at home, or at work
- Spill-proof: This durable keyboard features a spill-resistant design (1), anti-fade keys and sturdy tilt legs with adjustable height, meaning this keyboard is built to last
- Plastic parts in K120 include 51% certified post-consumer recycled plastic*
import { defineConfig } from '@playwright/test';
export default defineConfig({
expect: { timeout: 10_000 }
});
First verify that the locator identifies the intended element and that the application actually transitions to the expected state. A longer assertion timeout cannot repair a selector that never matches.
Handle action and navigation timeouts narrowly
Action and navigation timeouts are independent controls. Set them for a specific operation when that operation has a known, valid upper bound:
await page.getByRole('button', { name: 'Save' }).click({ timeout: 12_000 });
await page.goto('https://example.test/report', { timeout: 30_000 });
For repeated policy across a project, configure use.actionTimeout or use.navigationTimeout. Playwright cautions that flakiness may be caused elsewhere, so inspect actionability, selectors, server health, and navigation events before raising these values globally.
Hooks and teardown need their own investigation
beforeEach and beforeAll
beforeEach time counts toward the test timeout. beforeAll and afterAll have their own timeout, defaulting to the test timeout. Set a hook-specific value inside the hook when appropriate:
Rank #4
- 【Dreamy Rainbow Gaming Keyboard】K521 Gaming Keyboard Adopts a Different LED Backlight Design, Upgraded on the Traditional LED Backlight Effect, Making the Light More Penetrating, Giving You a More Dazzling Visual Effect, Making Your Gaming Process More Enjoyable
- 【One Touch Opens & Visual Feast】The K521 Red Dragon Keyboard has a One-Touch on/off Lighting Button for Added Convenience. It also has a Three-Position Adjustable Breathing Mode and a Four-Position Adjustable Brightness Lighting Mode
- 【Mechanical Feeling & Fast Tapping】The PC Keyboard Keys are Designed for Mechanical Feeling, Giving You a Better Feel During Use and the Ability to Trigger Keys Quickly, Allowing You to Win All Your Games
- 【19 Keys Anti-Ghosting Keyboard】Anti-Ghosting Ensures Every Button Can Be Triggered. This Allows You to Trigger Key Combinations In The Game Accurately, And Each Skill Can Be Accurately Released to Increase Your Winning Rate. Redragon K521 Will Be Your Perfect Partner
- 【12 Multimedia Combination Keys】The K521 Wired Gaming Keyboard is Equipped with 12 Multimedia Keys That Can Greatly Enhance Your Gaming/Office Efficiency and Make It More Convenient to Use
test.beforeAll(async () => {
test.setTimeout(60_000);
await startExternalDependency();
});
Fixture teardown and afterEach
After the test function finishes, teardown and afterEach run in a separate timeout window of the same value. Inspect cleanup calls, browser context disposal, API deletes, and process shutdown independently from setup. A fixture that sets up quickly can still fail because its cleanup hangs.
Replace fixed sleeps with synchronization
Playwright explicitly advises: “Never wait for timeout in production. Tests that wait for time are inherently flaky. Use Locator actions and web assertions that wait automatically.” Replace this:
await page.waitForTimeout(5000);
await page.getByText('Complete').click();
with a web-first condition:
await expect(page.getByText('Complete')).toBeVisible();
await page.getByText('Complete').click();
For application work that is not represented by a locator, wait for a meaningful signal such as a response, URL transition, or explicit readiness event:
await Promise.all([
page.waitForResponse(response =>
response.url().endsWith('/jobs') && response.ok()
),
page.getByRole('button', { name: 'Start job' }).click()
]);
Use a fixed delay only for a narrowly documented external limitation that cannot expose a signal, and isolate that exception rather than adding sleeps throughout the suite.
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 minuteBest Value
- All-day Comfort: This USB keyboard creates a comfortable and familiar typing experience thanks to the deep-profile keys and standard full-size layout with all F-keys, number pad and arrow keys
- Built to Last: The spill-proof (2) design and durable print characters keep you on track for years to come despite any on-the-job mishaps; it’s a reliable partner for your desk at home, or at work
- Long-lasting Battery Life: A 24-month battery life (4) means you can go for 2 years without the hassle of changing batteries of your wireless full-size keyboard
- Simply plug the USB receiver into a USB port on your desktop, laptop or netbook computer and start using the keyboard right away without any software installation
- Simply Wireless: Forget about drop-outs and delays thanks to a strong, reliable wireless connection with up to 33 ft range (5); K270 is compatible with Windows 7, 8, 10 or later
Common fixture timeout symptoms and fixes
| Symptom | Likely cause | Focused fix |
|---|---|---|
| Timeout while entering fixture setup | Service startup, authentication, data creation, or readiness probe is slow or never resolves | Inspect the awaited call; add a reliable readiness signal or a fixture tuple timeout |
| Timeout after the test body passes | Fixture teardown or afterEach cleanup hangs |
Instrument cleanup and use the teardown timeout window; fix the resource shutdown |
expect(...) timed out |
Wrong locator, missing state transition, or assertion budget too small | Verify the locator/state, then set matcher or expect.timeout |
click/fill timed out |
Element is hidden, disabled, covered, detached, or locator is ambiguous | Use a stable locator and inspect actionability; set per-action timeout only if justified |
goto timed out |
Navigation or server response is slow, blocked, or waiting for an unsuitable load condition | Check server logs and navigation semantics; set a targeted navigation timeout |
| Debug run passes but CI fails | Debug mode disables normal timeout pressure and changes execution conditions | Re-run normally, then fix readiness, isolation, resources, or parallelism |
| Entire run stops at a deadline | Global timeout reached | Profile the suite; do not use global timeout to mask one fixture |
Performance and reliability checklist
- Log start and finish around each expensive fixture phase, including elapsed milliseconds.
- Fail fast on non-OK API responses and include response details in the error.
- Reuse immutable worker resources only when tests cannot mutate shared state.
- Keep per-test fixtures isolated to avoid cross-test races during parallel execution.
- Close pages, contexts, servers, and database connections in teardown.
- Run the focused test under normal settings after Inspector diagnosis.
- Measure the slow operation before selecting a timeout; leave headroom for ordinary CI variance, not unlimited time.
Or skip the browser setup
If your goal is to obtain a clean website image rather than test browser behavior, ScreenshotNeo provides a single HTTP call. It accepts the cookie or consent banner like a visitor, removes more than 60 known consent platforms, newsletter popups, and chat widgets before capture, and lets you turn each cleanup step off. Bot checks or CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed; response headers identify the page verdict and whether the shot was billed. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf to Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month with no card; paid plans start at $5 for 3,000 shots.
See the full parameter list in the ScreenshotNeo documentation.
cURL
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 also supports full-page capture with lazy images, CSS-selector element shots, dark mode, device presets and custom viewports, retina scale, PDFs, custom CSS/JavaScript, clicks, selector or network-idle waits, request blocking, headers/cookies/user agents, authorization, timezone and geolocation, transparent backgrounds, resizing, chosen cache TTLs, signed links, asynchronous webhooks, bulk capture of up to 100 URLs per call, usage reporting, and an OpenAPI specification. Create a free ScreenshotNeo account to use the 1,000 monthly shots without a card.
Frequently Asked Questions
Why does changing expect.timeout not fix a fixture timeout?
They govern different operations: expect.timeout controls auto-retrying assertions, while fixture setup and teardown use fixture or test lifecycle timeouts.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsIs a zero timeout safe outside Inspector?
No. Debug mode uses zero as a diagnostic convenience. Normal runs should retain finite, deliberately chosen limits.
Should I set one very large global timeout for CI?
No. A global timeout limits the entire run and can hide a deadlocked fixture. Diagnose the phase and change its narrowest matching control.
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.

