Handle a delayed location popup
Medium50 pts~2 min
- Explicit waits
- Modals
- Delayed content
Practice app · ShopZone
A full marketplace: two-step sign-in, search with filters and sorting, product pages with tabs, a cart with coupons, and checkout.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Two seconds after the page loads, a “Choose your location” dialog appears. Wait for it without fixed sleeps, set pincode 560001, and verify the delivery location in the header.
Your task
- 1Open TEST_URL.
- 2Wait for the dialog #location-modal to appear (it opens after a delay).
- 3Enter 560001 in #location-pincode and click Apply (#location-apply).
- 4Assert the dialog closed and #deliver-to reads “Deliver to Bengaluru 560001”.
Acceptance criteria
- The location dialog is closed.
- The header shows Bengaluru 560001.
- The test uses no fixed sleeps.
Fixtures
- buyer@shopzone.test
- Password
- Shop@123
- Account name
- Asha Verma
- Coupon
- SAVE10 (10% off the subtotal)
- Pincodes
- 560001 Bengaluru · 110001 New Delhi · 400001 Mumbai · 600001 Chennai
Selenium WebDriver 4 · Selenium Challenges · ShopZone