Skip to content
CodeKruPro

Count Table Rows

66/70

Count Table Rows

Use locator.count() to count matching elements.

Task:

  1. Navigate to https://testkru.com/Elements/Tables
  2. Count the data rows in #employeeTable tbody tr
  3. Count the header rows in #employeeTable thead tr
  4. Print both counts

Expected output:

Data rows: 5
Header rows: 1