Playwright

Abort image and analytics requests

Medium70 pts
  • route.abort
  • Test Speed
  • Network Blocking
Practice app · TargetQA Practice Store

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

Test URL
/lab/playwright-abort-image-and-analytics-requests

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

Objective

Speed up test execution by aborting unnecessary image or telemetry network requests.

Your Task

  1. 1Set up route interception to abort image requests (such as .png, .jpg, .svg) and analytics requests before navigation.
  2. 2Navigate to the store home page at TEST_URL.
  3. 3Assert that the hero heading (#page-title) is visible and displays the store title.

Validation Checks

  • Calls route.abort for image and telemetry requests
  • Store home page is loaded at TEST_URL
  • Hero heading (#page-title) is verified visible and displays store title
  • At least 1 assertion passes

Playwright · Playwright Practice Track · Network & mocking