Web Table Methods in UFT With Example

While automating web based application every automation QA has to deal with various kind of validation on web tables.The Web table class in UFT provides various methods to work on a web table. In this blog post, I will show you various useful web table methods in UFT with examples.

Web Table Methods in UFT

ChildItem Method

Returns a test object from the cell by type and index. The first object has an index of 0.
Example

ChildObjects Method

Returns the collection of child objects contained within the object. Here we need to first create the description of the object of the class for which we need to get the child objects. The following example returns all the hyperlinks of a web table.
Example

ChildItemCount Method

Returns the number of objects of a specific type in the specified cell. The following example returns the count of all hyperlinks that are inside the second row and third column of a web table. The first row and column in the table are numbered 1.
Example

GetCellData Method

Returns the text contained in the specified cell. We have to provide a row and column index.
Row and column index starts from 1. The following example returns the value from the first row and third column of a web table.

Example

GetRowWithCellText Method

Returns the number of the first row found that contains a cell with the specified text. This method is very useful in getting the row number of a cell with the specified text. This method is quite useful to directly get the row number of the required text without iterating the entire table and reading each cell value if it’s a unique value in each row of the table.

Example

ColumnCount Method

Returns the number of columns in the table.
Example

RowCount Method

Returns the number of rows in the table.
Example

DoubleClick Method

Clicks on the object twice. This method can use to double click a clickable cell of a table.
Example

Recommended Posts

Leave a Reply