Forum Discussion

Ravik's avatar
Ravik
Super Contributor
12 years ago

How to handle wait Pop up (Progress bar) in TestComplete

Hi All,



In my Application when I select some data from drop down a Pop up is appear and says Please wait..., (when wait pop up appearing my application page not visible until the wait pop up is on) for Wait it's specific how much time it will take (some time it will take 20 sec, 30 sec or some time it will take 50 sec not sure).



How we can handle this pop up, Please guide us.



Thanks

Ravik





  • Hello Ravi Khapre, how are you doing?



    There are many ways to wait for this pop up window to disappear.



    You can use the WaitWindow method to check if the window is shown, and then the .Exists method as loop to wait while the window is been shown. Like this:



    p = Sys.Process("Notepad");

    // Waits for the window for 10 seconds

    w = p.WaitWindow("*", "Open*", -1, 10000);

    while (!w.Exists)

    {

      Delay(1000)

    }




    Check this article for more information (I've edited the code above for your need): Waiting for an Object, Process or Window Activation
  • joffre's avatar
    joffre
    Regular Contributor
    Hello Ravi Khapre, how are you doing?



    There are many ways to wait for this pop up window to disappear.



    You can use the WaitWindow method to check if the window is shown, and then the .Exists method as loop to wait while the window is been shown. Like this:



    p = Sys.Process("Notepad");

    // Waits for the window for 10 seconds

    w = p.WaitWindow("*", "Open*", -1, 10000);

    while (!w.Exists)

    {

      Delay(1000)

    }




    Check this article for more information (I've edited the code above for your need): Waiting for an Object, Process or Window Activation
  • TanyaYatskovska's avatar
    TanyaYatskovska
    SmartBear Alumni (Retired)

    Hi Ravik,


     


    I guess your app is the Ajax-based one, right? Please read the "Waiting For Web Pages" help topic to learn what approaches you can use.


     

  • Ravik's avatar
    Ravik
    Super Contributor
    hi,



    It's Ok for window application, What about web application. (For this pop - up our developer use JavaScript) how we can do it. Can  we handle JavaScript pop-up in TestComplete ?



    Thanks

    Ravik