N NextGen Virtual Academy
AD Administrator Learning Manager
SELENIUM WEBDRIVER · PRACTICE LAB

Web Tables

Practice locating table elements, reading rows and columns, validating employee data and performing dynamic table operations using Selenium WebDriver.

LAB TABLE
OBJECTIVE

What You Will Practice

  • Identify table headers.
  • Count rows and columns.
  • Read complete table data.
  • Find an employee by name.
  • Retrieve a particular cell.
  • Validate employee salary.
  • Edit employee records.
  • Delete employee records.
01

Employee Web Table

Practice locating rows, columns and individual table cells.

BASIC TABLE
Employee ID Name Department Role Salary Status Action
EMP001 Arjun Kumar QA Automation Engineer ₹65,000 Active
EMP002 Priya Sharma Development Java Developer ₹72,000 Active
EMP003 Rahul Verma Testing Manual Tester ₹55,000 Active
EMP004 Sneha Reddy API Testing API Tester ₹68,000 On Leave
EMP005 Karthik Raj DevOps DevOps Engineer ₹78,000 Active
Selenium Hint //table[@id='employeeTable']//tbody/tr
02

Table Operations

Use these controls to understand how Selenium interacts with tables.

PRACTICE
03

Find Employee

Practice identifying a specific employee row from the table.

SEARCH
Selenium Hint //table[@id='employeeTable']//tr[td[normalize-space()='Arjun Kumar']]
04

Validate Employee Salary

Practice retrieving cell values and validating expected results.

VALIDATION
05

Dynamic Table Practice

Add a new employee and observe how the table changes dynamically.

DYNAMIC
QUICK REFERENCE

Selenium Web Table Commands

Find Table
WebElement table =
driver.findElement(
    By.id("employeeTable")
);
Find Rows
List<WebElement> rows =
table.findElements(
    By.tagName("tr")
);
Find Columns
List<WebElement> cells =
row.findElements(
    By.tagName("td")
);
Get Cell Text
String value =
cell.getText();