You are on page 1of 8

Selenium With C#

SESSION -04

Simple HTML Table

Simple algorithm to read HTML Table

HTML Read design

Base class

Base Class initialize the driver

Other classes will extend the driver from Base class

TablePage

TablePage extends Base class

Create PageFactory in constructor


Indicates the table element by XPATH

Utility Class

ReadTable Method Reads the table and put the values to the
TableDataCollection list

ReadCell method will print the cell value based on columnName and
rowNum

Calculation happens based on element <th>, < tr>, <td> element

Program (Executable Class)

You might also like