Forum Discussion

ddguy's avatar
ddguy
Occasional Contributor
4 years ago
Solved

Help With Object Not Found Error

Hi,

I do QA for a desktop application. This application has UI threads that are sometimes slow, which I believe is causing our nightly Test Complete tests to fail with "the object does not exist" errors.

 

Some important notes:
- In the screenshots of the errors, I can see the button/window/object which indicates that it exists, however TestComplete can not find it
- TestComplete keeps searching for the object, in a seemingly recursive fashion (see image below)

 

Is there a way to retry the last step that caused the logErrorHandler event? Maybe within the logErrorHandler code? Or is there some other solution to this?

I have tried using the Aliases.myApp.Refresh() within the error handler and it does not help. I would like to avoid using delays between steps as that would make our tests too long. I also would like to avoid writing custom code which write the test name into a file and re-runs the tests that way, since the errors would still show up and fail the Jenkins job, which is what we use to run the nightly tests on a VM.

 

Any help would be very much appreciated!

  • Hi,

     

    I would start from figuring out what causes the 'Catastrophic failure' error. It might be an indication of some crash of/in the tested application or in TestComplete itself.

     

    You may also consider to use .WaitXXX methods (WaitWindow(), WaitAliasChild(), etc.) to dynamically wait until the sought for object becomes available.

     

4 Replies

  • AlexKaras's avatar
    AlexKaras
    Champion Level 3

    Hi,

     

    I would start from figuring out what causes the 'Catastrophic failure' error. It might be an indication of some crash of/in the tested application or in TestComplete itself.

     

    You may also consider to use .WaitXXX methods (WaitWindow(), WaitAliasChild(), etc.) to dynamically wait until the sought for object becomes available.

     

    • sonya_m's avatar
      sonya_m
      SmartBear Alumni (Retired)

      Thank you Alex!

       

      Hi ddguy, have you tried implementing the suggested approach?

      • ddguy's avatar
        ddguy
        Occasional Contributor

        Hi Alex and Sonya,

         

        I will implement this soon and try it out, thank you for the reply.!