- 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