Forum Discussion

DCat1223's avatar
DCat1223
Frequent Contributor
6 years ago
Solved

Object not identified when test is running but is always identified when hilighting in mapping

Good evening.

I have an object ( a button) in a test case that fails to get identified every time my test is executed.  When the test fails and stops, I go right to the Name Mapping screen, and right-click on the object in the name map and select Highlight and the object always is identified immediately so the mapping knows the object but the test case doesn't for some reason.  I have remapped this object and I have redone the lines in the test case, but the test case still fails to identify the object.  I do not have extended find turned on.  Has anybody run into this?  It's making me nuts! 

 

Thanks for the help in advance. 

  • I wouldn't use WaitProperty as that requires the object to exist to actually CALL WaitProperty.  I'd do a verifcation of the object by calling "WaitChild" or "WaitAliasChild" on the parent object to wait for the control and then verify if the returned value has an Exist property set to true.

3 Replies

  • shankar_r's avatar
    shankar_r
    Community Hero

    Possible reason:

    • TestComplete runs fast, the object might be slow to get displayed.

    To try:

    • Use object.WaitProperty("Exists",true) and see what happens.
    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      I wouldn't use WaitProperty as that requires the object to exist to actually CALL WaitProperty.  I'd do a verifcation of the object by calling "WaitChild" or "WaitAliasChild" on the parent object to wait for the control and then verify if the returned value has an Exist property set to true.

      • DCat1223's avatar
        DCat1223
        Frequent Contributor

        Thank you!  This was helpful!  I appreciate the response!