Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to end script in QTP if the Do Until loop goes to infinite.
#1
Solved: 11 Years, 3 Months, 3 Weeks ago
Hi , Can anyone please help with below issue.
I have a Do Until ...Loop condition ,
Code:
Do Until X= "Ordered"  
          Call Login Function
          Browser().page().link().click
         Browser().Page().webbutton("Approve).click
         X = Browser().page().webelement("Status").GetROproperty ("Innertext")  
If  X = "Ordered" Then Exit DO
Loop
every time i login with a different username using datatable, click the required link and click Approve button, for every time i approve, the status changes to "Partially approved", "Approved", "Ordered". my loop continues till it finds the Ordered status
some times, we dont get Ordered status due to some acceptable errors or warnings. in such cases, is their any option to end the loop say after 15 times of exceution and still the ordered status is not found.
Reply


Messages In This Thread
How to end script in QTP if the Do Until loop goes to infinite. - by uma87 - 09-29-2011, 03:22 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Creating interface in UFT 15.0 for end user sravanmonty 0 896 07-16-2019, 03:47 AM
Last Post: sravanmonty
  Not able to send spacebar with End Key to TE nbansal 1 3,629 02-08-2013, 11:31 PM
Last Post: coolguy
  Can't Identify on Second loop MichaelS 2 3,515 10-07-2011, 07:07 PM
Last Post: MichaelS

Forum Jump:


Users browsing this thread: 4 Guest(s)