- Symptom
- page.waitForLoadState: Timeout 30000ms exceededgoto with waitUntil: 'networkidle' passes locally and times out in CIAdding a chat widget or analytics script makes unrelated tests fail
- Cause
- networkidle waits for 500 ms with zero open connections, which never happens on pages that poll or hold sockets. Playwright marks the option as discouraged for testing.
- Fix
- Remove networkidle and wait for the thing the test needs with a web-first assertion.
- Apply
await page.goto('/dashboard') await expect(page.getByRole('heading', { name: 'Dashboard' })).toBeVisible()- Affected
- All Playwright versions, page.goto, page.waitForLoadState, page.waitForNavigation
- Sources
Last verified 2026-10-15 · Confirmed by 0 builders