Selenium WebDriver 4

Handle a dynamic product grid

Hard120 pts~45 min
  • Dynamic DOM
  • Explicit waits
  • Stale elements
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.

Test URL
/lab/dynamic-product-grid

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

Objective

Drive a grid that re-renders after every filter and sort, waiting for the new data instead of stale elements.

Your task

  1. 1Open TEST_URL (the Gear Shop) and wait for #results-count to show the catalogue total.
  2. 2Select "cameras" in #category-filter and wait for #results-count to read "3 products".
  3. 3Select "price-asc" in #sort-select and wait for the grid to re-render.
  4. 4Assert all 3 .product-tile elements have data-category "cameras" and the first .tile-name is "Instant Film Camera".

Acceptance criteria

  • The grid shows 3 cameras sorted by price
  • Filter and sort requests were sent
  • No fixed sleeps
  • At least 3 assertions pass

Constraints

  • Do not use Thread.sleep / time.sleep.

Selenium WebDriver 4 · Selenium · Featured challenges