Playwright

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

Medium50 pts
  • 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/playwright-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.

Validation Checks

  • 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

Cloud Execution & Grading Guide

This Medium Playwright Challenges exercise runs inside TargetQA's managed cloud sandbox using Playwright (TypeScript, JavaScript, Python, Java, 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: TypeScript (@playwright/test) · JavaScript (@playwright/test) · Python (Playwright + pytest) · Java (Playwright for Java + JUnit 5) · C# (Playwright for .NET + NUnit)
  • Zero local setup: Use the pre-declared TEST_URL variable so your script targets the live StayNest 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.

Playwright · Playwright Challenges Practice Track · StayNest