I have written a wait function.Below is the code snippet.I appreciate if anybody could provide me any better way of writing the same.
Public Function WaitForReady(windowname)
objClass = "JavaWindow"
Select Case objClass
Case "JavaWindow" Do wait(5)
Loop Until JavaWindow(windowname).Exist
Loop Until Window(windowname).Exist
Loop Until Browser(windowname).Exist
Re: Wait function
Have you tried using WaitProperty as described below (not sure if it will work for you). You should probably check to see if something is visible though. Look up WaitProperty in the QTP help, or when recording, in the insert tab there is a Synchronization Point menu item that is available
Browser(windowname).WaitProperty "enabled", True, 10000