Selenium WebDriver 4

Wait for an element to disappear

Medium70 pts~25 min
  • Explicit waits
  • Loaders
Practice app · Order Tracker

Asynchronous UI that appears, changes and disappears on timers — for explicit, implicit and fluent waits.

Test URL
/lab/selenium-wait-for-an-element-to-disappear

Your starter code already declares TEST_URL — never hardcode a host.

Objective

Synchronise on loaders going away before reading the result.

Your task

  1. 1Open TEST_URL and wait until #page-loader is invisible.
  2. 2Click #load-status and wait until #spinner is invisible.
  3. 3Assert #order-status reads “Shipped”.

Acceptance criteria

  • An invisibility condition is used
  • #spinner is gone
  • #order-status reads “Shipped”
  • 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