Playwright

Set up the trace and screenshot options

Medium70 pts
  • Screenshots
  • Traces
  • Visual Artifacts
Practice app · TargetQA Practice Store

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

Test URL
/lab/playwright-set-up-the-trace-and-screenshot-options

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

Objective

Capture a component screenshot of the hero banner element and verify its presence.

Your Task

  1. 1Open the practice store at TEST_URL.
  2. 2Locate the promotional hero banner #hero-banner.
  3. 3Capture an element screenshot of #hero-banner to 'hero-banner.png'.
  4. 4Assert that #hero-banner is visible.

Validation Checks

  • Locator screenshot method is called with path hero-banner.png
  • #hero-banner is visible
  • At least 1 assertion passes

Playwright · Playwright Practice Track · Setup & first test