Selenium WebDriver 4

Wait for the flash sale countdown, then buy

Medium50 pts~2 min
  • Explicit waits
  • Enabled state
  • Countdowns
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-flash-sale-wait

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

Objective

The Flash Sale deal's Buy button stays disabled until a countdown reaches zero. Wait for it to unlock without using fixed sleeps, buy the deal and verify the cart.

Your task

  1. 1Open TEST_URL and click Grab the deal (#flash-sale-link) in the Flash Sale section.
  2. 2Assert that the countdown #flash-countdown is visible and that the Buy button #flash-buy is disabled.
  3. 3Wait until #flash-buy becomes enabled (the countdown reaches 00:00:00 and #flash-status reports that the sale is live).
  4. 4Click #flash-buy and assert that the cart lists Aurex ANC 700 Wireless Headphones and that #cart-count shows 1.

Acceptance criteria

  • The flash deal is in the cart.
  • The cart badge shows 1.
  • The browser is on the cart page.
  • The test uses no fixed sleeps.

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