BeginnerPW-TBL-00115 minutesPlaywright

Find one employee row

Several employees share a first name, so the row must be scoped by other visible cells.

  • tables
  • locators

Objective

What to automate

Find Rahul Sharma in Engineering and assert the row contains Pune.

Preconditions and test data

Preconditions

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

Test data

  • name: Rahul Sharma
  • department: Engineering
  • location: Pune

Expected result

Exactly one matching row is found and it contains Pune.

Progressive hints

Hint 1

Scope to the static employee table.

Hint 2

Use getByRole(row) with a name pattern.

Hint 3

Assert a cell inside the matched row.

I’ve tried it — show solution
  1. Scope to the static employee table.
  2. Use getByRole(row) with a name pattern.
  3. Assert a cell inside the matched row.