Write a custom expected condition
Hard120 pts~45 min
- Custom conditions
- Explicit waits
Practice app · Order Tracker
Asynchronous UI that appears, changes and disappears on timers — for explicit, implicit and fluent waits.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Write your own wait condition that combines two signals no built-in condition covers.
Your task
- 1Open TEST_URL.
- 2Write a condition (lambda, function or ExpectedCondition class) that is true only when
#attribute-targethas class “is-ready” and#dynamic-textreads “Ready”. - 3Pass it to an explicit wait.
- 4Assert
#dynamic-textreads “Ready”.
Acceptance criteria
- A custom condition is passed to an explicit wait
#dynamic-textreads “Ready”- At least 1 assertion passes
Constraints
- Do not use fixed sleeps (Thread.sleep, time.sleep, Task.Delay, driver.sleep).
Selenium WebDriver 4 · Selenium · Waits & synchronization