Forum Discussion

joeychou99's avatar
Regular Visitor
4 years ago

TestComplete Verifying long wait time

I'm currently trying to verify a visual prompt reminder kinda like an icon showing up every hour. Normal I would just do a WaitProperty attaching isVisible, but I think waiting an hour pretty absurd....
  • Wamboo's avatar
    4 years ago



    I suggest You write an interval function for these actions:

    use Timer object:





    // unit name 'Example1'
    function run() {
      MyTimer = Utils.Timers.Add(3000, "Example1.timerRoutine", true);
    function timerRoutine() {
      Indicator.PushText("FROM TIMER!")
    // unit name 'Example2'
    //USEUNIT Example1
    function runTimer() {;  
      for(y = 1; y < 1000000; y++) {
        Indicator.PushText("waiting for timer!")



    If You run this function, you can see that every 3s indicator will switch text from "waiting for timer!" to "FROM TIMER!"

    Write Your own function to look for that popUp every 1h. But be careful.



    When a timer elapses, TestComplete pauses the test to run the timer’s routine. The test is resumed after the timer routine has finished running.

    Because of this, try to make timer routines as fast as possible. Using many timers with long-running routines can slow down the test run.