Forum Discussion

Actinomorphic's avatar
Actinomorphic
Occasional Contributor
6 years ago

If Object Auto-wait timeout not working

In the above image, the keyword test runs fine as long as I have the Delay preceding the highlighted If Object test action. If I remove the delay and instead set the Auto-wait Timeout of the highlighted If Object test action to even a ridiculous amount, like 30000 ms, the keyword test fails with a log message of "Unexpected window: 'EZSetup Wizard' 16:37:29 Normal 13.15" which is the object the highlighted If Object should be waiting for. In addition, there is no indication in the TestComplete indicator that the test is waiting for the object to appear, as is the case with the other If Object test actions in the keyword test.

  • Thanks for the replies and ideas folks. It turned out that the FormEZWizard didn't actually even exist in the mode the SetupScreen was in at the time, so I added an IfObject Exists ahead of the IfObject Visible and it works fine now.

     

  • Actinomorphic's avatar
    Actinomorphic
    Occasional Contributor

    Thanks for the replies and ideas folks. It turned out that the FormEZWizard didn't actually even exist in the mode the SetupScreen was in at the time, so I added an IfObject Exists ahead of the IfObject Visible and it works fine now.

     

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    My current understanding is like this:

    > Unexpected window: 'EZSetup Wizard'

    This message means that the object (window) that your test code tries to interact with is overlapped by another modal window which makes it impossible for TestComplete (like for the human user) to interact with the target window.

    Considering the above, it looks like that your test code tries to click the Cancel button on the EZWizard form. But at the moment of click this form is overlapped by the EZSetupWizard one. This makes it impossible to click Cancel button and triggers the Unexpected Window error.

    With the Delay operation enabled, EZSetupWizard window has enough time to close and this unblocks access to the EZWizard form.

    More reliable way to implement this part of test is to wait until the Exists property of the EZSetupWizard window becomes false and then continue. This can be implemented using the .WaitProperty() method.

     

  • If the other If Object - Visible lines in your test are working properly, then I would contact Support about this issue.  Here's the link: https://support.smartbear.com/message/?prod=TestComplete

     

    If none of them are working, I would suspect a timing issue.  Try using the Debug function and step through one that isn't working so you can see what TestComplete sees at each point.