Store Pagination
Challenge Tasks (3)
Tick a task when your script passes it. Tasks with a pass/fail box tick themselves.
Practice automating page navigation through a catalog of real products.
About this Store Pagination page
Pagination splits a long list of items across numbered pages, and testing it means checking that next, previous and page links load the right items. To practice, loop until the next button is disabled, collect items from each page, and assert there are no duplicates or gaps. This free page gives you a paginated product store with tasks.
Frequently asked questions
How do I automate pagination in Selenium?
Loop: read the items on the current page, then click the Next button if it is enabled, and stop when it is disabled or missing. In Selenium 4 use WebDriverWait to confirm the page changed before reading again, to avoid stale element errors.
How do I loop through all pages in Playwright?
Use a while loop that collects page.locator('.product') texts, then checks await next.isEnabled() and clicks it. After each click, wait for the first item text or the page indicator to change so you do not read the old page.
What are the main pagination test cases?
Check the first page has Previous disabled, the last page has Next disabled, page numbers jump correctly, items per page is consistent, no item repeats across pages, and the total count matches. Also test an invalid page number in the URL.
How do I know I reached the last page?
Check that the Next control is disabled, hidden or absent, or that the current page equals the total pages shown. Do not rely on a fixed page count, because data can change between runs.
Where can I practice pagination testing for free?
This page is free, needs no signup and runs in the browser. It lists store products over several pages, with positive and negative tasks, a pass or fail result box and hints.
Free developer tools on Randomly.online
QA Playground is part of Randomly.online. These tools help while you write and debug tests: