docs: use waitForLoadState instead of waitForTimeout

This commit is contained in:
Tommy D. Rossi
2026-01-24 15:20:07 +01:00
parent 7d8ab09f70
commit 6f19ec6b29
+1 -1
View File
@@ -74,7 +74,7 @@ playwriter -s 1 -e "console.log(state.users)"
**Intercept network requests:**
```bash
playwriter -s 1 -e "state.requests = []; page.on('response', r => { if (r.url().includes('/api/')) state.requests.push(r.url()) })"
playwriter -s 1 -e "await page.click('button'); await page.waitForTimeout(1000)"
playwriter -s 1 -e "await page.click('button'); await page.waitForLoadState('networkidle')"
playwriter -s 1 -e "console.log(state.requests)"
```