Please refer to the ChildItem method of the WebTable object under QTP help. You would need to use this method for the CheckBox as well as the Link:
The 3rd parameter points to the ClassName of the object. 4th is the index relative to the number of similar objects present in the cell.
You can retrieve the number of rows and columns using RowCount/ColumnCount or GetROProperty. You would need to run a loop from the row below the header (generally 2) to the last row/column combination and check for CheckBoxes as well as the links. It should be something like this:
You could run a similar code for the Link..
I hope this helps a little.
Code:
'CheckBox
.ChildItem(iRow, iCol, "WebCheckBox", iIndex)
'Link
.ChildItem(iRow, iCol, "Link", iIndex)
The 3rd parameter points to the ClassName of the object. 4th is the index relative to the number of similar objects present in the cell.
You can retrieve the number of rows and columns using RowCount/ColumnCount or GetROProperty. You would need to run a loop from the row below the header (generally 2) to the last row/column combination and check for CheckBoxes as well as the links. It should be something like this:
Code:
Const row = 2 '2 because generally the 1st row is the row header
Const col = 1
Dim iRows, iCols
Dim r, c
iRows = Browser("").Page("").WebTable("").GetROProperty("rows")
iCols = Browser("").Page("").WebTable("").GetROProperty("cols")
For r = row to iRows
For c = col to iCols
'Check if the cell contains a checkbox
'You can also write an else for a condition when the checkbox does not exist
If Browser("").Page("").WebTable("").ChildItem(r, c, "WebCheckBox", 0).Exist(0) Then
'Check the checkbox in the cell
Browser("").Page("").WebTable("").ChildItem(r, c, "WebCheckBox", 0).Set "ON"
End If
Next
Next
You could run a similar code for the Link..
I hope this helps a little.