Mask a dynamic region
Hard120 pts
- Masking
- Dynamic Data
- Visual Comparison
Practice app · Gear Shop
A product grid loaded from a real API with search, filters, infinite scroll and a checkout that calls a payments API.
Your starter code already declares TEST_URL — never hardcode a host.
Objective
Mask volatile or dynamic page elements during visual snapshot comparisons.
Your Task
- 1Navigate to the dynamic content scenario page.
- 2Locate #product-grid and ensure elements are loaded.
- 3Capture a visual screenshot comparison while masking the dynamic price elements .product-price.
Validation Checks
- Passes mask array to toHaveScreenshot
- At least 1 assertion passes
Playwright · Playwright Practice Track · Visual & accessibility