Log in with OTP, buy a phone and pay with UPI
Hard100 pts~2 min
- End-to-end flows
- OTP login
- Radio buttons
- Explicit waits
- Page transitions
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.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Automate the full purchase: log in with an OTP, add Vexa Note 13 Pro 5G to the cart, check out to the saved address, pay with a verified UPI ID and verify the order confirmation.
Your task
- 1Open TEST_URL, click Login (#login-button), enter 9876543210, request the OTP, read the code from #sms-otp, verify it, and assert that #account-name reads “Rohan”.
- 2Search for “vexa note 13 pro” in #search-input (press Enter), open Vexa Note 13 Pro 5G from the results and click Add to cart (#add-to-cart). Assert that #cart-count shows 1.
- 3Open the cart (#nav-cart) and click Place order (#place-order).
- 4Click Deliver here (#deliver-here) for the saved address, then choose UPI (#pay-upi).
- 5Type rohan@fmupi in #upi-id, click Verify (#verify-upi) and wait for #upi-verified.
- 6Click the pay button (#pay-button) and assert that #order-confirmation shows “Order Confirmed!” with an order id (#order-id, OD…), that #order-payment shows UPI (rohan@fmupi) and that #order-items lists the phone.
Acceptance criteria
- The order is confirmed with an OD… order id.
- The payment method is UPI with the verified ID.
- The order contains Vexa Note 13 Pro 5G for ₹23,999.
- The test makes at least three assertions along the journey.
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