The waiting game. Designing reliable Selenium test
summary
Replaces ad hoc sleeps and retries with concrete WebDriverWait–based replacements, claiming fewer flakes and less code by turning sequences like driver.get plus sleep into a single waiter.get(url) that waits for document ready and element presence. Shows custom boolean waits (try/catch clicks) and combined actions like clickAndWaitForText, provides a Java library on GitHub for Maven/Gradle use, and describes a nasty dropdown wait that finally made a flaky test deterministic.
AI-written summary · about
chapters (23)
- 0:00Intro
- 0:35Overview
- 1:43WebDriverWait
- 2:54Timeout
- 3:53Disclaimer
- 4:20What I waited for
- 5:55Waiter class
- 6:56Selenium comments
- 9:23Wait for page load complete
- 11:07Wait for page to load
- 11:34Create your own get method
- 12:34Click on an element
- 13:09How it works
- 15:13Element GetText
- 15:58Element Wait
- 16:39Click and Wait
- 17:29Opening a page
- 17:54asserttrue element
- 18:20reliable test
- 19:20waiting for element attribute
- 19:55benefits of using weights
- 20:16the most complicated weight
- 21:10Questions
related talks
32mSleeping is not your best friend in automation
27mBeing Good At Waiting
37mDeep dive into Selenium waits
01h 14mContinuous Testing
42mReliable and Maintainable Webdriver Tests
39mTesting web apps with Selenium
43mEliminating Illiteracy: Implicit & Explicit Waits, PageFactory
46mTest Automation with Selenium WebDriver, Java, and JUnit
