Manuals / Selenium WebDriver / Chapter 3
A · WebDriver Core · beginner · Week 1–2 · Chapter 3 of 12
Explicit waits — never Thread.sleep
Flaky Selenium is almost always wrong waits. WebDriverWait + ExpectedConditions beat sleep every time.
Path progress19%
Step 1 of 4
Ban Thread.sleep
sleep(3) hides races. Under CI load, races become flakes. Zero tolerance.
Do this now
Search codebase for sleep/Thread.sleep/time.sleep. Replace all.
Was this step clear?
Chapter learning outcomes
- Implicit vs explicit waits
- ExpectedConditions
- Custom wait conditions
- FluentWait
Clear these before you leave
Side quest
Ajax wait
Wait for element after AJAX on dynamic_controls — checkbox enabled.