Selenium WebDriver 4

Search a round trip using the swap button

Easy35 pts~2 min
  • Autocomplete
  • Radio buttons
  • Custom date pickers
Practice app · SkyWay

An online travel agency: airport autocomplete, a custom calendar, travellers popover, timed search results with sorting and filters, a fare modal, passenger validation, a seat map, card payment inside an iframe, and a manage-booking page with native confirm and prompt dialogs.

Test URL
/lab/selenium-skyway-round-trip-swap

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

Objective

Fill the search form the wrong way round, fix it with the swap button, pick departure and return dates in the custom calendar, and search for a Bengaluru → New Delhi round trip.

Your task

  1. 1Open TEST_URL.
  2. 2Type “Delhi” into #from-input and click #from-option-DEL; type “Beng” into #to-input and click #to-option-BLR.
  3. 3Click the swap button (#swap-airports) and assert #from-input shows “Bengaluru (BLR)” and #to-input shows “New Delhi (DEL)”.
  4. 4Select the Round trip radio (#trip-round).
  5. 5Click #depart-date and choose the day labelled “Choose Friday, 20 November 2026”; click #return-date and choose “Choose Tuesday, 24 November 2026”.
  6. 6Click #search-flights and assert #search-summary contains “Bengaluru → New Delhi” and “Return Tue, 24 Nov”.

Acceptance criteria

  • The search is for a round trip from BLR to DEL.
  • The departure date is 20 Nov 2026 and the return date is 24 Nov 2026.
  • The results summary shows the route and return date.
  • The test makes at least two assertions.

Fixtures

Airports
BLR Bengaluru · DEL New Delhi · BOM Mumbai · MAA Chennai · GOI Goa · HYD Hyderabad
Today
Tuesday, 10 November 2026 (earlier dates are disabled)
Test card
4111 1111 1111 1111 · expiry 12/29 · CVV 123
Declined card
4000 0000 0000 0002
Existing booking
PNR SW7K2Q · last name Verma
Travellers
Asha Verma (34, Female) · Rohan Verma (36, Male) · asha.verma@example.com · 9876543210

Selenium WebDriver 4 · Selenium Challenges · SkyWay