IntermediatePW-TBL-00225 minutesPlaywright

Sort and filter employees

A manager needs only active QA staff in Pune ordered by salary.

  • tables
  • sorting
  • filters

Objective

What to automate

Filter Active employees in Pune, sort by salary, and assert the visible rows.

Preconditions and test data

Preconditions

  • Use a fresh isolated Practice Lab browser context.
  • Open the fixture identified by FX-TABLE-001.

Test data

  • location: Pune
  • status: Active
  • sort: salary ascending

Expected result

Every row is Active and Pune, and salaries are ascending.

Progressive hints

Hint 1

Apply both select filters before reading rows.

Hint 2

Read the salary column as numbers.

Hint 3

Compare the values to a sorted copy.

I’ve tried it — show solution
  1. Apply both select filters before reading rows.
  2. Read the salary column as numbers.
  3. Compare the values to a sorted copy.