Playwright

Pick a destination from the autocomplete list

Easy30 pts
  • Autocomplete
  • Combobox / listbox
  • Explicit waits
  • 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-destination-autocomplete

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

Objective

Type a partial destination into the StayNest search bar, choose Cape Town from the suggestion list and verify the search results for Cape Town.

Your Task

  1. 1Open TEST_URL and click the “Where” field (#destination-input).
  2. 2Type “Ca” and wait for the suggestion list #destination-suggestions to appear.
  3. 3Assert it offers both “Banff, Canada” and “Cape Town, South Africa”, then click the Cape Town option ([data-testid="destination-option"][data-destination="cape-town"]).
  4. 4Assert #destination-input now holds “Cape Town, South Africa” and click Search (#search-button).
  5. 5Assert #results-heading reads “Stays in Cape Town” and exactly 4 listing cards ([data-testid="listing-card"]) are shown.

Validation Checks

  • The destination field holds “Cape Town, South Africa”.
  • The results page is titled “Stays in Cape Town” and shows 4 stays.
  • The URL carries dest=cape-town.
  • The test makes at least two assertions.

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 Easy 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 30 points.

Playwright · Playwright Challenges Practice Track · StayNest