Selenium WebDriver 4

Sort mobiles by price with the sort tabs

Easy30 pts~2 min
  • Tabs
  • ARIA state
  • Ordered lists
  • Sorting
Practice app · FlipMart

An Indian electronics megastore: mobile-number + OTP login with an on-page SMS, an Electronics hover mega-menu, search autocomplete, listings with a price slider, brand filters, sort tabs and infinite scroll, a 3-product compare table, product pages with offers, pincode checks and rating breakdowns, a flash sale countdown, a login-gated wishlist, and a cart with UPI, card and Cash on Delivery checkout.

Test URL
/lab/selenium-flipmart-sort-tabs

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

Objective

On the Mobiles listing, switch to the “Price -- Low to High” sort tab and verify that the cheapest phones come first.

Your task

  1. 1Open TEST_URL and click Mobiles in the category bar.
  2. 2Click the “Price -- Low to High” tab (#sort-price-asc).
  3. 3Assert that the tab is selected (aria-selected="true").
  4. 4Assert that the first card is Orbit Lite 4G at ₹6,999 and that the second card costs ₹7,499.

Acceptance criteria

  • The Price -- Low to High tab is selected.
  • The first result is Orbit Lite 4G at ₹6,999.
  • The second result costs ₹7,499.
  • The test makes at least two assertions.

Fixtures

Mobile number
9876543210
OTP
482913 (also shown in the on-page SMS)
Account name
Rohan Mehta
UPI ID
rohan@fmupi
Saved address
221B, 12th Main Road, Indiranagar, Bengaluru - 560038
Pincodes
560001 / 560038 Bengaluru · 110001 New Delhi · 400001 Mumbai · 600001 Chennai · 700001 Kolkata · 500001 Hyderabad
Today
Tuesday, 10 November 2026

Selenium WebDriver 4 · Selenium Challenges · FlipMart