Playwright / Quiz
Sleep Is for the Weak Suite
waitForTimeout, networkidle, stale element handles, and the wait-then-click races that auto-waiting was built to kill.
- Difficulty
- Hard
- Format
- Quiz
- Points
- 200
- Estimate
- 10 min
// MISSION BRIEF
Your Mission
Somebody's "quick fix" added nine seconds of sleep to the checkout test, and it still flakes. This quiz is a purge list: the waiting habits that look defensive and are actually the disease.
Know the anti-pattern, know its replacement, know the one case where an explicit wait is still the right call.
Speed bonus active.
// FIRST CONTACT
Battle teaser
Why is page.waitForTimeout(3000) structurally incapable of fixing flake?
- AIt only works in headed mode
- BThe method has a known bug in Chromium
- CIt is capable, the number is just usually too small
- DA fixed delay is not tied to any condition: on fast runs it wastes 3s, on slow runs the app still is not ready at 3.001s
Answers, scoring, hints, and the full battle stay sealed.
// SKILL TAGS
playwrightflakinessauto-waitinganti-patternse2e-testing