Playwright

Override a fixture per test

Medium70 pts
  • test.use
  • Fixture Override
  • Scoped Options
Practice app · TargetQA Practice Store

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

Test URL
/lab/sdet-override-a-fixture-per-test

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

Objective

Override Playwright fixture options such as viewport per test or per describe block.

Your Task

  1. 1Override the viewport fixture options for the test scope to width 1280 and height 720.
  2. 2Navigate to the store home page at TEST_URL.
  3. 3Assert that the viewport size indicator (#viewport-size) is visible and displays '1280 × 720'.

Validation Checks

  • Test configuration overrides viewport with width 1280 and height 720
  • Store home page is loaded at TEST_URL
  • Viewport size indicator (#viewport-size) is visible and displays '1280 × 720'
  • At least 1 assertion passes

Playwright · SDET Practice Track · Fixtures