Wait for an attribute to change
Medium70 pts~25 min
- Explicit waits
- Attributes
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
Wait for a data attribute to switch state.
Your task
- 1Open TEST_URL —
#attribute-targethas data-state “loading”. - 2Wait until its data-state attribute is “ready” (about 2 s).
- 3Assert data-state is “ready” and the class contains “is-ready”.
Acceptance criteria
- An attribute-based wait is used
#dynamic-textreads “Ready” (same timer)- At least 2 assertions pass
Constraints
- Do not use fixed sleeps (Thread.sleep, time.sleep, Task.Delay, driver.sleep).
Selenium WebDriver 4 · Selenium · Waits & synchronization