Selenium WebDriver 4

Handle pagination

Medium70 pts~25 min
  • Tables
  • Pagination
  • Loops
Practice app · People Directory

A sortable, filterable, paginated employee table and a live counter.

Test URL
/lab/selenium-handle-pagination

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

Objective

Walk through every page of the directory and verify all 30 people are listed exactly once.

Your task

  1. 1Assert #page-info reads “Page 1 of 3”.
  2. 2Loop: collect the td.col-name texts, then click #next-page while it is enabled and wait for #page-info to change.
  3. 3Assert you collected 30 unique names.
  4. 4On the last page assert #page-info reads “Page 3 of 3” and #next-page is disabled.

Acceptance criteria

  • Pages are traversed in a loop
  • The table ends on “Page 3 of 3”
  • At least 2 assertions pass

Selenium WebDriver 4 · Selenium · Tables & dynamic content