Playwright

Pick a search suggestion with the keyboard

Medium50 pts~2 min
  • Autocomplete
  • Keyboard interaction
  • ARIA listbox
  • Assertions
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/playwright-flipmart-autocomplete-keyboard

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

Objective

Type a partial query into the search box and use only the arrow keys and Enter to choose the Orbit X5 Pro 5G suggestion, then verify that its product page opened.

Your task

  1. 1Open TEST_URL and type “orbit x5” into #search-input.
  2. 2Wait for the suggestions listbox #search-suggestions. It lists 3 options: Orbit X5 5G, Orbit X5 Pro 5G and Orbit X5 Neo 5G.
  3. 3Press ArrowDown three times, then ArrowUp once, so that the second option (Orbit X5 Pro 5G) is highlighted with aria-selected="true".
  4. 4Press Enter.
  5. 5Assert that #product-title reads “Orbit X5 Pro 5G” and that #search-input now contains the suggestion text.

Acceptance criteria

  • The Orbit X5 Pro 5G product page is open.
  • The search box shows the chosen suggestion.
  • The test asserts the highlighted option and the opened product.

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

Playwright · Playwright Challenges · FlipMart