salman
salman

Reputation: 35

How to click the button in the cell of webtable

Suppose webtable contains 5 rows and 5 columns and my is requirement is I want to click button inside cell no 3rd row and 4th column. How can I get that can I get the code.

Upvotes: 1

Views: 678

Answers (1)

Ankur Jain
Ankur Jain

Reputation: 236

QTP/UFT provides the .ChildItem method for this.

Browser("B").Page("P").WebTable("WT").ChildItem(3, 4, "Link", 1).Click

The syntax being ChildItem(row, col, micClass, ItemIndex)

If it is a dynamic table, then get the number of rows using .RowCount and columns using .ColumnCount method at run time.

A variation of your question is discussed in detail here.

Upvotes: 1

Related Questions