Forum Discussion

Ryu's avatar
Ryu
Contributor
6 years ago
Solved

Tested App not visible until after test fails because UI does not exist

So I'm running a tested app through a subroutine in my script.  My script runs the app, but the app will not display in the UI until the script run fails because the app children "don't exist."  The ...
  • Ryu's avatar
    6 years ago

    I tried several things to fix it, and one thing worked.  TC was failing to enact the timeout I had set because it couldn't see the the window; I put in a delay command with the same length as the set timeout immediately after the run command.  Gave it just enough time (interference?) to let the program UI pop-up and TC continued with the test.

  • cunderw's avatar
    cunderw
    6 years ago

    Instead of a hard coded delay you would be better off implementing on of the many wait commands. This will wait up to to a specified maximum amount of time before continuing. A hard delay could be not enough time, or actually inflate test time if the app becomes usable before the delay expires.

     

    https://support.smartbear.com/testcomplete/docs/app-objects/common-tasks/index.html