Forum Discussion

googleid_118035's avatar
googleid_118035
Contributor
12 years ago

How to wait till the page get activated

Hi ,

I am using Testcomplete version 9.20.2460.7.

My question is in a particular page, once I click a button entire page get inactive.

I was unable to wait till get page activate.

I am using VB scripting.

Attach a screenshot of the page, where when I click the button.

  • gid_216's avatar
    gid_216
    Frequent Contributor
    if you want to wait till the page activated,try below one.



    "

    set obj = Aliases.<Mapping 1>.WaitAliasChild("Name", duration)

    Do until obj.exists

    set obj = Aliases.<Mapping 1>.WaitAliasChild("Name", duration)

    Loop

    Do until obj.visible

    Loop

    "



    it will wait indefinitely till the object exists and visible.
  • sbkeenan's avatar
    sbkeenan
    Frequent Contributor
    Hi Dev



    Depending on what method you are using, you will need to use one of the wait routines.  For example, I use aliases in my tests, so when I want to wait until a particular object is available, I use the WaitAliasChild function.  You can find detailed information in the online help, but basically, something along the lines of :





    if (aliases.<myApplication>.WaitAliasChild("<myWindow>", 5000).Exists) then

      'do something here

    end if



    you can place this in a loop or increase the timeout, depending on your needs.



    Hope this helps.



    Regards

    Stephen.

  • Hi All,



    Sorry for the delay response, thanks for the tips from you guys.



    I have found the solution which is as below.



    1. Use call object method and capture the path of that object which is popup and displaying "Progress" text.

    2. Use that path and write the VB code which wait till that object get disappear (VB code already exsists in the testcomplete help site).




    Do


    aqUtils.Delay 1000


    Set obj = Full object path here


    Loop Until false = obj.VisibleOnScreen