QA training sandbox

A car-rental flow built for reliable tests.

Practice finding, filtering, and selecting a sample vehicle with accessible Playwright locators and stable CSS hooks.

Static sample inventory

Choose a car for your scenario

Filter by vehicle type or search by make and model. The sample listings do not change between visits.

6 sample vehicles shown.

Hybrid 路 Compact Silver compact hybrid sedan

Compact 路 Hybrid

Toyota Corolla

  • Automatic
  • 5 seats
  • 2 bags
View vehicle details

A practical sample listing for testing expandable details and summary locators.

Hybrid 路 Compact Blue compact hybrid sedan

Compact 路 Hybrid

Honda Civic

  • Automatic
  • 5 seats
  • 2 bags
View vehicle details

A fictional compact-car listing for practicing second-match and card-scoped locators.

SUV 路 Family Charcoal family SUV

SUV 路 Petrol

艩koda Kodiaq

  • Automatic
  • 7 seats
  • 3 bags
View vehicle details

A fictional family-sized listing for practicing card-specific assertions.

Plug-in hybrid 路 SUV Blue plug-in hybrid SUV

SUV 路 Plug-in hybrid

Volvo XC60

  • Automatic
  • 5 seats
  • 3 bags
View vehicle details

A fictional SUV listing for practicing second-match and card-scoped locators.

Electric 路 Premium White electric sedan

Electric 路 Premium

Tesla Model 3

  • Automatic
  • 5 seats
  • Electric
View vehicle details

An illustrative electric-car listing for practicing type-based filters.

Electric 路 Crossover Silver electric crossover

Electric 路 Crossover

Hyundai Ioniq 5

  • Automatic
  • 5 seats
  • 3 bags
View vehicle details

A fictional electric crossover listing for practicing second-match and card-scoped locators.

No car selected. Choose a sample vehicle to show a local demo confirmation.

Training notes

Locator practice

Playwright recommends these seven built-in locators. Start with user-facing roles, text, and labels; use test IDs as explicit testing hooks. CSS remains available when needed.

getByRole()

Find an action by its accessible role and name.

page.getByRole('button', { name: 'Search cars' })

getByText()

Find visible page text, such as a vehicle heading.

page.getByText('Toyota Corolla', { exact: true })

getByLabel()

Find a form control by its associated visible label.

page.getByLabel('Pick-up location')

getByPlaceholder()

Find the vehicle search field by its hint text.

page.getByPlaceholder('Try Toyota or electric')

getByAltText()

Find a car photo by its descriptive alternative text.

page.getByAltText('Silver compact hybrid sedan')

getByTitle()

Find the currency abbreviation by its explanatory title.

page.getByTitle('United States dollars').nth(0)

getByTestId()

Target a card through its stable test ID contract.

page.getByTestId('vehicle-card-corolla')

CSS locator

Select vehicle cards by their semantic type attribute.

page.locator('[data-vehicle-type="electric"]')

Second matching card with .nth()

Playwright indexes matches from zero, so index 1 targets the second compact car.

page.locator('[data-vehicle-type="compact"]').nth(1)