Selenium WebDriver 4

Filter restaurants with a cuisine chip

Easy30 pts
  • Toggle buttons
  • aria-pressed
  • Filtering
  • Collections of elements
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-cuisine-chips

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

Objective

Use the cuisine chips to show only Biryani restaurants and verify the chip state, the result count and the remaining cards.

Your Task

  1. 1Open TEST_URL.
  2. 2Click the “Biryani” cuisine chip (#cuisine-biryani).
  3. 3Assert the chip has aria-pressed="true".
  4. 4Assert #result-count starts with “2 restaurants” and that exactly 2 cards remain, Biryani Baithak and Nizam's Biryani House, both with data-cuisine="Biryani".

Validation Checks

  • The Biryani chip is pressed.
  • Exactly 2 restaurant cards remain.
  • Every remaining card is a Biryani restaurant.
  • The test makes at least two assertions.

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

Cloud Execution & Grading Guide

This Easy Selenium Challenges exercise runs inside TargetQA's managed cloud sandbox using Selenium WebDriver 4 (Java, Python, C#). Every submission runs inside an isolated headless Chromium container with pre-synced drivers, capturing live console logs, DOM assertions, and a 720p step-by-step video replay.

  • Supported stacks: Java (Selenium 4 + JUnit 5) · Python (Selenium 4 + pytest) · C# (Selenium 4 + NUnit)
  • Zero local setup: Use the pre-declared TEST_URL variable so your script targets the live FoodRush sandbox reliably without hardcoding hosts.
  • Automated grading: Click Run to inspect step logs and behavior, then click Submit to validate all 4 acceptance checks and earn 30 points.

Selenium WebDriver 4 · Selenium Challenges Practice Track · FoodRush