Task Progress0 of 5 Tasks
0%

Tables & Lists

Read cells, sort columns, filter rows, count list items and page through results. The data changes on every visit, so read tasks can only be solved by reading the page. Each task ticks itself the moment your script gets it right.

1.Tables

Find a cell by its rowTo do
IDProduct NamePriceStatus
1Laptop$1454Out of Stock
2Smartphone$1455In Stock
3Headphones$984In Stock
Goal

Find the product that is Out of Stock and type its price (digits only) in the answer box.

Sortable columnTo do
Product Name
Price ↕
Status
Laptop$1454Out of Stock
Smartphone$1455In Stock
Headphones$984In Stock
Monitor$224Out of Stock
Keyboard$618In Stock
Goal

Sort the table by price, highest first, and assert the prices are in descending order.

Filter and count rowsTo do
Showing 12 of 12
Product NamePriceStatus
Laptop$1454Out of Stock
Smartphone$1455In Stock
Headphones$984In Stock
Monitor$224Out of Stock
Keyboard$618In Stock
Mouse$713In Stock
Webcam$772Out of Stock
Speaker$943Low Stock
Tablet$416Low Stock
Charger$1331In Stock
Router$394Out of Stock
Printer$391In Stock
Goal

Filter the catalogue to “Low Stock” and type how many rows are left.

2.Lists

Count and read list itemsTo do

Checklist (unordered)

  • Write the test plan
  • Set up the framework
  • Automate the smoke suite
  • Add API checks

Steps (ordered)

  1. Step one
  2. Step two
  3. Step three
Goal

Type the text of the last item in the checklist.

3.Pagination

PagerTo do
Showing page 1 of 10
Goal

Jump to the last page, then use Previous to go back to page 9.

About this Tables & Lists page

A web table is an HTML grid of rows and cells that automated tests read, sort, filter and click inside. To practice, locate rows by their text rather than by index, read cell values by column, and assert after sorting or filtering. This free page gives you a dynamic data grid with tasks you can solve in Playwright, Selenium or Cypress.

Screenshot of the Tables & Lists practice page on QA Playground. Extract data from dynamic data grids.
Tables & Lists: Extract data from dynamic data grids.

Frequently asked questions

How do I get a cell value from a web table in Selenium?

Find the row with a locator such as //tr[td[text()='Alice']], then read the cell with a relative path like ./td[3] and call getText(). Locating the row by content instead of index keeps the test stable when the data order changes.

How do I locate a table row by text in Playwright?

Use page.getByRole('row').filter({ hasText: 'Alice' }) to get the row, then row.getByRole('cell').nth(2) for a column. Playwright re-queries on each action, so the locator survives re-sorting and re-rendering.

How do I test table sorting in automation?

Click the column header, read every value in that column into an array, and compare it with a sorted copy of the same array. Check ascending and descending, and test numbers and dates separately because text sorting orders them differently.

How do I count rows in a dynamic table?

Query the row locator after the data has loaded, for example expect(rows).toHaveCount(10) in Playwright or findElements(By.cssSelector('tbody tr')).size() in Selenium. Wait for a known row or loading indicator first so you do not count a half-rendered table.

Is there a free page to practice web table automation?

Yes. This page is free, needs no signup and runs in the browser. It has a dynamic data grid, a task list with positive and negative cases, a pass or fail result box and hints for each task.

Free developer tools on Randomly.online

QA Playground is part of Randomly.online. These tools help while you write and debug tests: