Playwright

Configure the base URL

Medium70 pts
  • baseURL
  • Relative Navigation
  • Route State
Practice app · TargetQA Practice Store

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

Test URL
/lab/playwright-configure-the-base-url

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

Objective

Leverage base URL configuration to navigate between store routes and verify in-app navigation.

Your Task

  1. 1Open the practice store at TEST_URL.
  2. 2Click the products link #nav-products to view the catalog.
  3. 3Assert that the route indicator #current-route displays '/products'.
  4. 4Click the home link #nav-home to return to the homepage.
  5. 5Assert that the route indicator #current-route displays '/home'.

Validation Checks

  • Navigates to /products and back to /home
  • #current-route updates to '/home'
  • At least 2 assertions pass

Playwright · Playwright Practice Track · Setup & first test