Forum Discussion

murugans1011's avatar
murugans1011
Regular Contributor
12 years ago

Waiting for an process to complete

Hi, In my project if testedapp command is clicked then the cmd window will be opened, it performs some operation and automatically cmd window will be closed.i need to wait (pause script execution) till cmd operation to be complete. i have tried callobjectmethodasync  but its not working with testcomplete methods

1 Reply

  • sbkeenan's avatar
    sbkeenan
    Frequent Contributor


    Hi Murugan



    If you are using Aliases, is it possible for you to map the command window so that you can use the WaitAliasChild function.  Something along the lines of





    while (<application>.WaitAliasChild("<window>", 500).Exists)

    {

       delay(1000);

    }



    This will test, for half a second, to see if your command window still exists. If so, it will wait for one second, then test again.  When the test fails, i.e. the command window is closed, the loop will end.



    Regards

    Stephen.