Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
for loop
#1
Solved: 11 Years, 4 Months, 3 Weeks ago
Hi All,

i have page which contains pagination.
and i want to search a particular category in the pages.
the logic goes link this
can i use 'for' or 'for each' instead of 'if'


Code:
A = Browser("abc").Page("pqr").Link("Pubs").GetROProperty("text")'If  A.Exist Then
function(call)
else
Browser("abc").Page("pqr").Link("2").Click
If  A.Exist Then
function(call)
else
Browser("abc").Page("pqr").Link("3").Click
If A.Exist Then
function(call)
else
Browser("abc").Page("pqr").Link("4").Click
If A.Exist Then
function(call)
else
Browser("abc").Page("pqr").Link("5").Click    
If  A.Exist Then
function(call)
else
Reporter.ReportEvent micFail,"invalid","category not found"
End if
End If
End If
End If
End If
Reply


Messages In This Thread
for loop - by sia sharma - 08-09-2012, 03:34 PM
RE: for loop - by ksrikanth2k9 - 09-13-2012, 11:44 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  FOR LOOP shayk1985 1 5,353 12-13-2012, 11:35 AM
Last Post: sams001
  How to exit from a for loop silpavinod 2 9,942 10-17-2012, 12:55 AM
Last Post: agarwl.anurag
  Help with Loop LJENNE 1 3,207 08-10-2012, 12:32 PM
Last Post: Ankesh
  How to get out of infinite FOR loop... sssidana 3 4,587 07-20-2012, 01:04 AM
Last Post: sree.85
  Not able to Iterate using For Loop tanyamrz 2 3,415 05-22-2012, 09:41 PM
Last Post: tanyamrz

Forum Jump:


Users browsing this thread: 1 Guest(s)