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.
If boolFlag = False Then
msgbox "Object does not meet the condition with in 3 minutes."
End If
Please let me know if you need any further info.
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()
Dim boolFlag : boolFlag = False
Do until boolFlag = False or DateDiff("n",strCurrentTime,Now())< 3
'here you can specify your condition to check.
'First of all Check whether that object exist or not
If Browser().Page().Frame().WebElement("Account Documents").Exist(0) Then
If Browser().Page().Frame().WebElement("Account Documents").GetROProperty("Visible") = True Then
boolFlag = True
Else
wait 1
End If
Else
msgbox "Specified object doesn't exist.
ExitDo
End If
Loop
msgbox "Object does not meet the condition with in 3 minutes."
End If
Please let me know if you need any further info.
Thanks,
SUpputuri
SUpputuri