Selenium WebDriver 4

Dismiss, then accept, the cancel booking confirmation

Medium50 pts
  • Confirm dialogs
  • Dismiss vs accept
  • State changes
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-cancel-booking

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

Objective

Find booking SW7K2Q, click Cancel booking and dismiss the confirmation to keep it, then cancel again and accept to cancel it for real.

Your Task

  1. 1Open TEST_URL and click Manage booking (#nav-manage).
  2. 2Enter SW7K2Q in #pnr-input and Verma in #lastname-input, then click #find-booking. Assert #booking-status reads “Confirmed”.
  3. 3Click #cancel-booking and dismiss the confirmation (Cancel). Assert #manage-message reads “Booking is still active”.
  4. 4Click #cancel-booking again and accept the confirmation (OK).
  5. 5Assert #manage-message contains “Booking cancelled” and #booking-status reads “Cancelled”.

Validation Checks

  • The first confirmation was dismissed, so the activity log records that the booking stayed active.
  • The second confirmation was accepted and the booking is cancelled.
  • The Cancel booking button is no longer shown.
  • The test makes at least three 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

Cloud Execution & Grading Guide

This Medium 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_URL variable so your script targets the live SkyWay 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 50 points.

Selenium WebDriver 4 · Selenium Challenges Practice Track · SkyWay