Playwright

Configure per-environment settings

Medium70 pts
  • process.env
  • Environment Config
  • Base URL
Practice app · TargetQA Practice Store

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

Test URL
/lab/playwright-configure-per-environment-settings

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

Objective

Configure per-environment settings like dynamic base URLs and verify navigation across environments.

Your Task

  1. 1Navigate to the store home page using the environment URL (TEST_URL or process.env.BASE_URL).
  2. 2Assert that the hero heading (#page-title) is visible and contains 'Welcome to the practice store'.
  3. 3Assert that the navigation link for products (#nav-products) is visible.
  4. 4Click the products navigation link (#nav-products) and assert that the browser URL navigates to '#/products'.

Validation Checks

  • Store home page is loaded at TEST_URL
  • Hero heading (#page-title) is verified visible and contains 'Welcome to the practice store'
  • Navigation link (#nav-products) is visible and clicked
  • Browser URL contains '#/products'
  • At least 1 assertion passes

Playwright · Playwright Practice Track · Projects & configuration