Do Until Loop issue - Printable Version +- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums) +-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP) +--- Forum: UFT / QTP Beginners (https://www.learnqtp.com/forums/Forum-UFT-QTP-Beginners) +--- Thread: Do Until Loop issue (/Thread-Do-Until-Loop-issue) |
Do Until Loop issue - mv8167 - 09-08-2011 Can anyone help me straighten out my Do Loop? Code: Do Until Browser("Wisdom").Page("WisdomLogin").Frame("parent").WebElement("Account Documents", "visable:=" &True).Exist(0) RE: Do Until Loop issue - tarun - 09-08-2011 If you are using this loop to verify if the web element is visible or not, then you can also use the following Code: sLoop = True RE: Do Until Loop issue - mv8167 - 09-08-2011 Thx, I will give this a try. I just thought I could pull this off all in three lines. I guess not. ;-) thxx RE: Do Until Loop issue - supputuri - 09-09-2011 Hi Guys, Just think out of box, what will happen if the application is crashed once the do loop is initiated? The script will never come back. So the best practice is when ever you are using do loop make sure you have initiate the time elapse. Below is the snippet, if you feel it's worth keeping the time then you can goahead and use this. Code: Dim strInitialTime : strInitialTime = Now() msgbox "Object does not meet the condition with in 3 minutes." End If Please let me know if you need any further info. RE: Do Until Loop issue - mv8167 - 09-09-2011 Perfect, im clear ;-) thx Supputuri |