Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
finding expected value in webtable
#1
Solved: 5 Years, 11 Months, 2 Weeks ago
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?

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:"&parameter.Item("Activity")&vbnewline,"Actual: "&actual

else
 ResultOutput "fail", "Expected:"&parameter.Item("Activity")&vbnewline,"Actual: "&actual
    End If
     Next

End Function 

Thanks in advance.
Reply


Messages In This Thread
finding expected value in webtable - by Anupama - 05-21-2018, 05:16 PM
RE: finding expected value in webtable - by Ankur - 05-22-2018, 03:08 PM
RE: finding expected value in webtable - by Ankur - 05-22-2018, 04:12 PM
RE: finding expected value in webtable - by Ankur - 05-22-2018, 07:06 PM
RE: finding expected value in webtable - by Ankur - 05-23-2018, 04:04 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  How to match weblist data with expected values Anupama 5 2,549 05-18-2018, 12:15 PM
Last Post: Ankur
  ALM resource(datatable) not used when expected psova 1 3,221 09-04-2013, 02:45 PM
Last Post: psova
  Not finding Mercury tours website sekmet 0 2,045 11-03-2008, 11:02 PM
Last Post: sekmet

Forum Jump:


Users browsing this thread: 1 Guest(s)