Playwright

Understand the test and expect API

Easy30 pts
  • test API
  • expect API
  • Auto-retrying assertions
Practice app · TargetQA Practice Store

A small storefront landing page for browser setup, navigation, titles, URLs and screenshots.

Test URL
/lab/playwright-understand-the-test-and-expect-api

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

Objective

Combine standard Playwright test blocks with web-first assertions to verify page title and navbar presence.

Your Task

  1. 1Open the practice store at TEST_URL.
  2. 2Assert that the page title equals 'TargetQA Practice Store'.
  3. 3Assert that the navigation link #nav-products is visible.

Validation Checks

  • Test checks page title using toHaveTitle
  • #nav-products is visible
  • At least 2 assertions pass

Playwright · Playwright Practice Track · Setup & first test