Handle the login-required wishlist dialog
- Modals
- Role locators
- Gated actions
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.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
As a signed-out shopper, tap a wishlist heart. Verify the login-required dialog, continue to login from it, and check that the login page knows which product you wanted to save.
Your Task
- 1Open TEST_URL and open the Mobiles listing.
- 2Click the heart on the Vexa Note 13 Pro 5G card ([data-testid="wishlist-toggle"][data-product-id="vexa-note-13-pro"]).
- 3Wait for the dialog #login-required-modal and assert that #login-required-message mentions Vexa Note 13 Pro 5G and the Wishlist.
- 4Click Login with OTP (#login-required-continue).
- 5Assert that the dialog is closed, the login page is shown, #login-context names Vexa Note 13 Pro 5G, and #wishlist-count is still 0.
Validation Checks
- The login-required dialog was shown and is now closed.
- The login page explains which product will be saved.
- The wishlist count is still 0.
- 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
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_URLvariable so your script targets the live FlipMart 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 · FlipMart