Playwright · sdk · fg-0312

A stuck click burns the whole test and fails as 'Test timeout of 30000ms exceeded' instead of naming the locator

If you see Test timeout of 30000ms exceeded, the cause and the fix for Playwright are below, last verified 2026-10-15.

Verified Oct 2026trust 50/100
Symptom
Test timeout of 30000ms exceeded.The error log ends with waiting for getByRole('button', { name: 'Submit' }) rather than a locator timeoutexpect assertions fail after 5 s while actions wait 30 s
Cause
Actions and navigations have no timeout of their own by default, so they wait until the 30 s test timeout ends the test. Assertions use a separate 5 s expect timeout.
Fix
Set actionTimeout and navigationTimeout below the test timeout so a missing element fails fast with its own error.
Apply
// playwright.config.ts export default defineConfig({ timeout: 60_000, expect: { timeout: 10_000 }, use: { actionTimeout: 10_000, navigationTimeout: 30_000 }, })
Affected
Playwright Test, all current versions
Sources

Last verified 2026-10-15 · Confirmed by 0 builders

Related traps

Have your agent know this before it fails

$ /plugin marketplace add getfootgun/footgun
$ /plugin install footgun@footgun