Selenium WebDriver 4

Jump to a menu category from the sidebar

Easy25 pts~2 min
  • In-page navigation
  • aria-current
  • Scrolling
  • URL assertions
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-menu-category-jump

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

Objective

Open Spice Route Kitchen and use the menu sidebar to jump to the Desserts section, then verify the section is in view and the sidebar marks it as active.

Your task

  1. 1Open TEST_URL and open Spice Route Kitchen ([data-restaurant-id="spice-route"]).
  2. 2In the menu sidebar (#menu-categories) click “Desserts” (#cat-link-desserts).
  3. 3Assert the section #menu-section-desserts is scrolled into the viewport.
  4. 4Assert #cat-link-desserts has aria-current="true", no other category link does, and the URL ends with section=desserts.

Acceptance criteria

  • The Desserts link is the only active category.
  • The URL deep-links to the Desserts section.
  • The test asserts the active state.

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