10-08-2013, 12:12 PM
(This post was last modified: 10-08-2013, 12:15 PM by BadrinarayananR.)
You can try the following code to compare two different web tables:-
Code:
Dim TableMatched = True
Set Table1 = Browser("abcd").Page("efgh").WebTable("xyz")
Set Table2 = Browser("abcd").Page("efgh").WebTable("pqr")
For rowcntr=1 to Table1.RowCount
For colcntr=1 to Table1.ColumnCount
If Table1.getCellData(rowcntr,colcntr) = Table2.getCellData(rowcntr,colcntr) Then
TableMatched = TableMatched AND True
Else
TableMatched = TableMatched AND False
End If
Next
Next
if TableMatched Then
Print "Table Matched"
Else
Print "Table Not Matched"
End If