Ask a Question

Object Not Found during test but is mapped


Object Not Found during test but is mapped

Hi, I am having difficulty with testcomplete recognizing objects.  My computer was recently upgraded to Office 365.

All my scripts fail (they all worked before).  I get "waiting for object" warnings, after a while the message changes to "Preparing Object Recognition Hint".  After another long wait, the script continues (succesfully) with the object copied to the clipboard.


I go into the log, click on the missing object, that opens the NameMapping window.  The item is there, and there is a picture of the text box with a red border that I am after.  When I right click and choose show in Object browser, it searches and gives error "Unable to find object that matches "pay_code"...Point to "pay_Code" on screen. so I try that and get the "Update Name Mapping" window.  I use the "point and fix" and mouse over test box. The Object name is filled in, and when I click "Highlight" the text box in the application flashes red...the preview also shows the text I am after.


When I click finish, an error saying "The parent object hierarchy of the selected object does not match the expected hierarchy. Please re-map the object manually to reflect the changes".... I am confused, I am not remapping manually with the ":update Name Mapping: window???


Champion Level 3

I believe what is happening is that it doesn't want to change the old pay_code mapping to pay_code2 because that looks like a different object to the mapping tool.  What it's asking for is for you to go the object itself and map it from there and you'll then have pay_code and pay_code2, which I realize is not what you want but that's what's happening right now.


Does Office 365 affect the application you are testing?  Did your OS also get upgraded?  What else could have changed?



SmartBear Alumni (Retired)

Thanks for your help, Marsha.

@Leahy, did this suggestion help?

Tanya Yatskovskaya
SmartBear Community and Education Manager

Thanks for checking in !!!  I have been very busy this week and will get back to this on monday.



I am not sure what is meant by "go to the object and map it from there".


I have re-recorded the script and still get "Waiting for pay_code object" then

 "Preparing Object Recognition Hint".  After another long, long wait, the script continues (succesfully) with the value copied into the variable


 When I look at the log I see "The object "pay_code" does not exist."

When I pull up the Object Spy, I get as the mapped name : "Aliases.hastus.Form.WIN_FORMTOOLSTRIPCONTAINER.WIN_FORMTOOLSTRIPCONTENTPANEL.Panel.pay_code"


From my code, this line gives the error:

"cur_paycode = Aliases.hastus.Form.WIN_FORMTOOLSTRIPCONTAINER.WIN_FORMTOOLSTRIPCONTENTPANEL.Panel.pay_code.wText;"

I have tried replacing "wText" with "Value", get same result.


I dont understand why it says it cant find it, says it will  give a recognition hint, waits for a very long time with error message on screen and then continues properly AND it found the item.

SmartBear Alumni (Retired)

Hi @Leahy,


You need to play with mapping criteria used to map your objects. Please refer to the following explaining in detail the suggested approach:


Name Mapping is a very powerful feature once you learn it in detail. Also, I recommend that you watch the following video explaining how to handle objects whose mapping criteria are changed from run to run (like in your case):


This video is quite old. However, it's still extra helpful.

Tanya Yatskovskaya
SmartBear Community and Education Manager

Showing results for 
Search instead for 
Did you mean: