Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
finding expected value in webtable
#4
Solved: 6 Years, 8 Months, 3 Weeks ago
ah ... it is doing exactly what you are asking it to do.

You need to put Exit For just after the pass condition. Something like this -  


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
Exit For
else
ResultOutput "fail", "Expected:"&parameter.Item("Activity")&vbnewline,"Actual: "&actual
   End If
    Next

End Function
Want to fast track your QTP/UFT Learning? Join our UFT Training Course
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 3,140 05-18-2018, 12:15 PM
Last Post: Ankur
  ALM resource(datatable) not used when expected psova 1 3,389 09-04-2013, 02:45 PM
Last Post: psova
  Not finding Mercury tours website sekmet 0 2,159 11-03-2008, 11:02 PM
Last Post: sekmet

Forum Jump:


Users browsing this thread: 1 Guest(s)