You have a very simple solution ...Instead of using wait property or inserting synchronization point. The following piece of script can be made reusable action and can be called anywhere while web page is loading..
If Browser (“micclass: =browser”).page (“micclass: =page”).exist then
Environment. Value (“class”) = browser (“micclass: =browser”)
Else if
Environment. Value (“class”) = browser (“creationtime: =1”)
End if
Start timer = time
Set B = Environment. Value (“class”)
While B.busy = true OR B.readystate <> 4
Set B = Environment. Value (“class”)
Wait (1)
Wend
End timer = time
If time > = 0 then
Msgbox (“browser is loaded”)
End if
Note: In While loop, 2 properties of Browser being used.
If Browser (“micclass: =browser”).page (“micclass: =page”).exist then
Environment. Value (“class”) = browser (“micclass: =browser”)
Else if
Environment. Value (“class”) = browser (“creationtime: =1”)
End if
Start timer = time
Set B = Environment. Value (“class”)
While B.busy = true OR B.readystate <> 4
Set B = Environment. Value (“class”)
Wait (1)
Wend
End timer = time
If time > = 0 then
Msgbox (“browser is loaded”)
End if
Note: In While loop, 2 properties of Browser being used.
Comments
Post a Comment