Selenium WebDriver 4

Follow a live order tracker until delivery

Medium50 pts~2 min
  • Explicit waits
  • Live status
  • Dynamic content
  • Data attributes
Practice app · FoodRush

A food-delivery app: set your delivery area through a native prompt, filter restaurants by veg-only, cuisine and search, sort them, customise dishes in a modal, manage a cart with a coupon, check out and follow a live order tracker before rating the meal.

Test URL
/lab/selenium-foodrush-live-order-tracking

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

Objective

An order has just been placed. Open its live tracker and wait, without fixed sleeps, while it moves from Order placed to Delivered. Then verify every step is complete and the rating section appears.

Your task

  1. 1Open TEST_URL and click “Track order” (#track-order-link) in the active-order banner.
  2. 2Assert #order-status shows “Order placed”.
  3. 3Wait for #order-status to show “Out for delivery”, then “Delivered”. Each step takes about 1.5 seconds.
  4. 4Assert all four [data-testid="tracking-step"] items have data-state="done" and the rating section #rate-order is visible.

Acceptance criteria

  • The order status is Delivered.
  • All four tracking steps are marked done.
  • The rating section is shown.
  • The test uses no fixed sleeps.

Fixtures

Delivery area
Any area name, e.g. Indiranagar
Coupon
FEAST50 (₹50 off item totals of ₹299 and above)
Delivery fee
₹40 per order
Taxes
5% GST & restaurant charges on the item total, rounded to the nearest rupee
Seeded cart
Dosa Darbar: Masala Dosa ×1 (₹120), Filter Coffee ×2 (₹60), Medu Vada ×1 (₹80)
Checkout details
Asha Verma · 9876543210 · 12, 4th Cross
Tracking
Order placed → Preparing → Out for delivery → Delivered, about 1.5 s per step

Selenium WebDriver 4 · Selenium Challenges · FoodRush