Forum Discussion

4 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    Another reason may be if your test code uses long timeout to wait for the object and object does not appear for a long time.

    For example:

    var obj = page.WaitAliasChild('TableWithAlotOfAjaxDataOverSlowConnection', 60000);

    The above line waits for the table to appear within 1 minute. If you click Pause while the code is waiting for the table, the code will not be paused until either the table is found or timeout elapses.

     

    To workaround the above inconvenience, you may replace single .WaitXXX() with a loop and smaller wait.

    Like this:

    var obj;

    var iStopTime = Win32API.GetTickCount() + iTimeout;

    // Wait for the element to appear
    do

    {
      obj = page.WaitAliasChild('TableWithAlotOfAjaxDataOverSlowConnection', 500);

    }

    while ((!obj.Exists) && (Win32API.GetTickCount() < iStopTime))

     

     

    • Adnan_Muzaffar's avatar
      Adnan_Muzaffar
      Occasional Contributor

      No I am not using long timeout's Pause button is disabled on Windows 10 with TestComplete 64bit.

       

      I am trying other solution and will share if get any solution.