Forum Discussion

venkat001's avatar
venkat001
Occasional Contributor
12 years ago

Prompt message in TestComplete without any buttons

Hi,
I'm developing a code to open URL, if Obj is not exists want to prompt message "Device is not Ready.. Please wait" without any button and then close the message window and then open URL again until obj.Exists


Need help on how to prompt a message window for defined time without any button.


Sub Test

ip_add = www.google.com
Do
Call Browsers.Item(i).Run(ip_add)
Set obj = Sys.Browser("iexplore").Window("#32770", "Windows Security", 1)
If not obj.Exists then
aqDlg.ShowMessage("Device is not Ready.. Please wait")
delay(2000)
End if

Loop Until obj.Exists

End sub

2 Replies

  • venkat001's avatar
    venkat001
    Occasional Contributor
    Hi,
    Temporarly got solution, Created userform with the label "Device is not Ready.. Please wait" and this has been called whenever it is required and displayed for few secs and disable the window.

    if someone has different methods also welcome.

    Regards,
    Venkat
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Venkateswaran,


     


    You can use the following code:




      Dim myMsgBox


      Set myMsgBox = CreateObject("Wscript.Shell")


      'Display a dialog and close it in 5 seconds


      Call myMsgBox.Popup ("Device is not Ready.. Please wait", 5)