Forum Discussion

maxime38's avatar
maxime38
Occasional Contributor
13 years ago

TestComplete 9 - Auto-Wait timeout

Hi,



My team have upgraded TestComplete 8.7 to 9.0 a few days ago, and we encountered some problems that we didn't have with TestComplete 8.7.. Before posting here we have searched an answer in the Help topic et on this forum, but with no result.



The main problem, and the most horrible, is the Auto-Wait timeout project property. It seems that TestComplete 9.0 use this timeout every time, even if you set the timeout to an other value in functions.





For instance , the following lines close Notepad window and wait until the window is not visible :



//Close the window

Aliases.Sys.Process("notepad").Window("Notepad", "New File", 1).Close();

//Wait up to 1sec for Exists= true

if(Aliases.Sys.Process("notepad").Window("Notepad", "New File", 1).WaitProperty("Exists", true, 1000)) 

    //Wait up to 5sec for Visible = false

   Aliases.Sys.Process("notepad").Window("Notepad", "New File", 1).WaitProperty("Visible", false, 5000);



TestComplete 8.7 is working well with Auto-wait timeout property = 10sec. It waits up to 1sec for Exists = true, and then if it is the case, waits up to 5 seconds that Visible = false. If the property Visible does not equals true after 5sec, it goes on.

TestComplete 9.0 is not working well because it does not wait up to 1sec for Exists but up to 10sec (because Auto-Wait timeout project property = 10sec). If Auto-Wait timeout project property = 0sec, it wait 0sec... Also for the Visible property.



This problem is very blocking because for our tests, we have to wait 50sec for a window, or 1sec in other cases, and to set the Auto-wait timeout to 50sec would be horrible for playback... We tried to set the Auto-wait timeout property to 0, but it doesn't work : TestComplete 9.0 wait 0sec instead of 1sec or 5sec... And of course scripts fell in error because there is no synchronization..





I've chosen to post here instead of sending mail to your support team because I think it is a bug, and it is quite easily to reproduce it.



Thanks in advance for any help !



Best regards,



Max.



PS : Please forgive my bad english ;-)
  • Julia_K's avatar
    Julia_K
    SmartBear Alumni (Retired)

    Hello Max,

    Actually, the TestComplete 9 behavior you describe is correct and expected.

    In your sample script, you close the notepad window, and then call the WaitProperty method to check the notepad window state.

    Since the notepad window is already closed, the WaitProperty method in your sample script is never called, because there is no object from which it could be called. And, since TestComplete looks for objects within the auto-wait timeout, this exact timeout passes.


    I hope this information helps. Please let us know if you need anymore assistance.

    Thank you.

  • maxime38's avatar
    maxime38
    Occasional Contributor
    Hi Julia,



    Thanks a lot for your answer. Now I can understand why we had this problem.



    We are going to try to find a solution to use this new behavior.



    Best regards

    Max.