Selenium WebDriver 4

Choose a check-in and check-out date in a custom calendar

Medium50 pts~2 min
  • Custom date pickers
  • Attribute locators
  • Disabled state
  • Assertions
Practice app · StayNest

A home-sharing marketplace: destination autocomplete, a two-month date-range calendar, a guests popover with steppers, results with a list/map toggle and a filters modal, listing pages with a photo gallery, a reserve card with a price breakdown, host profiles in a new tab, a wishlist that needs sign-in and a message-host form.

Test URL
/lab/selenium-staynest-date-range-calendar

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

Objective

Use the two-month calendar to book 28 December 2026 to 2 January 2027 (navigating to the next month), verify past days are disabled, and search with those dates.

Your task

  1. 1Open TEST_URL and click the Check in field (#checkin-field) to open the calendar #date-picker.
  2. 2Assert the past day button labelled “Choose Monday, 9 November 2026” is disabled (today is 10 November 2026).
  3. 3Click the day labelled “Choose Monday, 28 December 2026” as the check-in date.
  4. 4Click Next month (#calendar-next) until January 2027 is shown, then click “Choose Saturday, 2 January 2027” as the check-out date.
  5. 5Assert #dates-summary mentions 5 nights, #checkin-value shows 28 Dec 2026 and #checkout-value shows 2 Jan 2027.
  6. 6Click Search (#search-button) and assert #results-summary mentions 5 nights.

Acceptance criteria

  • Check-in is 28 Dec 2026 and check-out is 2 Jan 2027.
  • The search URL carries checkin=2026-12-28 and checkout=2027-01-02.
  • The results summary reports 5 nights.
  • The test makes at least three assertions (including the disabled past day).

Fixtures

Email
guest@staynest.test
Password
Nest@2026
Account name
Jordan Lee
Today
Tuesday, 10 November 2026 (earlier days are disabled)
Destinations
Goa · Lisbon · Kyoto · Banff · Cape Town
Service fee
14% of the nightly subtotal
Guest limits
Adults 1–16 (adults + children ≤ 16) · infants up to 5 · pets up to 5
Host verification code
Shown only on the host profile tab

Selenium WebDriver 4 · Selenium Challenges · StayNest