API Information

In this article, we will learn to handle Dynamic Web Table in Selenium WebDriver.

2. Basic Concepts:

  • A table with rows and columns on a web page is called a web table. In HTML, a table is created using the tag.
  • The table contains  headers represented as rows and Coloums as tag
  • There are two types of web Tables.
  1. Static web table: The number of rows and columns will be static means it is constant that will not be changed. Here we just need to find the WebElement of the particular row or column and simply can perform operations on the cell.
  2. Dynamic table: The number of rows and columns will be dynamic. It will be kept on changing based on data and this is the area where we will be focussing on.

3. Ways to Handle Dynamic WebTable:

  1. The standard way is where we will iterate over the rows and columns and reach a particular cell and get the cell value.
  2. By using custom XPath

Before proceeding further, let’s see how a dynamic table looks like