Micro Focus QTP (UFT) Forums
Exit Do loop - 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: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: Exit Do loop (/Thread-Exit-Do-loop)



Exit Do loop - shipu - 12-19-2013

Hello,

I have the do...while loop as below.

PHP Code:
Do While vbwindow(...).exist false

............

Loop 

If the vbwindow does not exist, do while loop takes more than 10 minutes to decide whether vbwindow exist or not. How can I exit out the do while loop if vbwindow does not exist in 30 seconds? How would I put the
PHP Code:
exit do 
inside the do while?

-S

lkjlkj


RE: Exit Do loop - basanth27 - 12-20-2013

Is this what you are looking for?

Code:
Do While vbwindow(...).exist = false
IntCounter=0
wait 1
IntCounter = IntCounter +1
If IntCounter = 30 Then
Exit Do
End If

Loop