Hi,
I am trying to retrieve cell data from particular column and compare it with expected parameter value. But the loop immediately returns fail as soon as the first match fails, Below is my code, What am I doing wrong?
Thanks in advance.
I am trying to retrieve cell data from particular column and compare it with expected parameter value. But the loop immediately returns fail as soon as the first match fails, Below is my code, What am I doing wrong?
Code:
Function VerifyHistory()
Dim funcName : funcName = "VerifyHistory"
Dim setupFuncName : setupFuncName = "SETUP|" & funcName
rowcnt = Browser("Br").Page("Pg").WebTable("Tbl").Rowcount
For i = 2 To rowcnt
actual= Browser("Br").Page("Pg").WebTable("Tbl").GetCellData(i,4)
If Instr(parameter.Item("Activity"),actual)>0 Then
ResultOutput "Pass", "Expected:"¶meter.Item("Activity")&vbnewline,"Actual: "&actual
else
ResultOutput "fail", "Expected:"¶meter.Item("Activity")&vbnewline,"Actual: "&actual
End If
Next
End Function
Thanks in advance.