Selenium WebDriver 4

Wait for a page load to complete

Medium70 pts~25 min
  • Page load
  • readyState
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-a-page-load-to-complete

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

Objective

Wait for the document to finish loading and for the app’s own loader to go away.

Your task

  1. 1Open TEST_URL.
  2. 2Wait until document.readyState is “complete” using executeScript inside an explicit wait.
  3. 3Wait until #page-loader is gone (about 2 s).
  4. 4Assert the title is “Order Tracker | TargetQA Practice”.

Acceptance criteria

  • document.readyState is checked
  • #page-loader is gone
  • 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