Name Mapping not Working in Latest Version

Originally posted by jgibbs343 on August 28, 2025

I am encountering a problem with name mapping in TestComplete where my script cannot find my mapped object. The mapped object is definitely visible, and if i go into the name mapping section of TestComplete and press “Highlight” test complete can see that it is on the screen and highlights it. It specifically cannot see the mapped object when the script is being run.

This name mapping worked in an older version(15.61), however in the newest version of test complete(15.76). I am not sure exactly between which versions it stops working. When I initially ran into this issue, most people suggested just rolling back to the previous version, and 15.61 was the only installer i had that i knew would work. I am trying to solve this without rolling back versions because i would like to use python 3.11.

Thank you, any help is appreciated.

Originally posted by rraghvani on August 28, 2025

You need to provide more content - are you testing against a Browser or Desktop application? If TestComplete can identify and highlight the UI object, then when you run your script what is changing? Are you using Classic of XPath?

Originally posted by jgibbs343 on August 28, 2025

I am testing against a Desktop application. When i run the the script nothing is changing. To the point that if i leave the application on the screen where TestComplete tells me it cant find it, and press highlight in name mapping, it highlights it.

I am using classic name mapping.

Originally posted by rraghvani on August 28, 2025

Are you able to create a new project, create a name mapping for the object, and perform the required action on the object?

What is the FullName property value of your object?

Originally posted by jgibbs343 on August 28, 2025

( Replied in the wrong place, and cant delete comments )

Originally posted by jgibbs343 on August 28, 2025

Ill attempt it in a new project. In my existing one, i Deleted and re-defined the existing Name Mapping and that didn’t work, so I will check if changing projects helps.

the FullName is

Sys.Process(“Phoenix”).Window(“Phoenix”, “Phoenix”, 1).Window(“MDIClient”, “”, 1).Window(“AfxFrameOrView140su”, “Phoenix”, 1).Window(“AfxFrameOrView140su”, “”, 1).Window(“#32770”, “”, 10)

Originally posted by rraghvani on August 28, 2025

If the FullName is *Sys.Process(“Phoenix”).Window(“Phoenix”, “Phoenix”, 1).Window(“MDIClient”, “”, 1).Window(“AfxFrameOrView140su”, “Phoenix”, 1).Window(“AfxFrameOrView140su”, “”, 1).Window(“#32770”, “”, 10)*then

Ensure the child object .Window(“#32770”, “”, 10) value does not change.

Also ensure the parent objects .Window(“AfxFrameOrView140su”, “”, 1) values does not change, including it’s parent objects.

In your new project, run your automation script, if it stops because it’s not able to find the name mapping. Then use the Object Spy tool to identify your UI object - do not close your application.

Originally posted by JAvila1234 on September 01, 2025

NameMapping is failing for me for Keyword Tests copied from one Project to another Project within the SAME Project Suite - yes, I used the “Add Existing Item” method to copy the test…

I see unresolved NameMapping issues going back over 5 years in this forum…

I understand how NameMapping might help handle system transitions - but, like most things in life, I find not calling things by their ‘true’ name causes more problems than it resolves…

My SOLUTION is to NOT use NameMapping - most simple editors can help make find/replace names in your code when needed :slight_smile:

Originally posted by jgibbs343 on September 02, 2025

So, in doing this I’ve noticed that the issue may be caused by the fact that the software is not already open prior to running the test, as I Open and close the software for every test. So I need to look into what about opening the software changes.

For reference, if I run the test and it fails, and i then run it again with the same instance, it works fine, so all of the elements of the name mapped item are the same every time i open the software, so I’m still not sure why this is happening, but i will be trying to get to the bottom of it.

Originally posted by jgibbs343 on September 02, 2025

I’ve looked through a lot of those as well. The strange thing for this instance, is that it is the same Project, nothing changed, except for my TestComplete version, and suddenly the name mapping is failing. My team has spent a decent amount of time mapping all of the screens and buttons in our software, so I’d like that work to be of use to us.

Originally posted by Hassan_Ballan on September 02, 2025

I understand you have an existing script that runs perfectly in project A, and in project B you used “Add Existing Item” to add project A script; however, this script fails to run under project B as it is not finding the NameMapping references.

If I correctly understood your scenario, you are missing an important fact that each project also contains it’s own NameMapping database that is not shared with other projects in the suite.

You could design you projects to share scripts as well as the required NameMapping https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/how-to/merge.html and that requires careful consideration and planning in addition to deep understanding of NameMapping https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/index.html

:speech_balloon: Found the answer helpful? Give it a Kudos by clicking Like!
:white_check_mark: Got your issue resolved? Click Mark as Solution so others can find it quickly.

Originally posted by Hassan_Ballan on September 02, 2025

It is recommended to start and close the application for each test as you are doing. If the test fails on the first run but passes when re-run on the same instance, that may suggest a timing or synchronization issue — e.g., the application isn’t fully loaded or ready when the test begins. On re-run, it’s already initialized, so everything works.

:light_bulb: What You Can Try

  • Ensure your Name Mapping includes reliable properties (like WndClass or ObjectType) and not just dynamic ones like WndCaption.
  • Use TestedApps to start the application within your test.
  • Add wait logic to confirm windows/controls are ready before interacting with them (like WaitWindow, WaitChild, or Exists). Avoid hard-coded delays (aqUtils.Delay) in favor of conditional waits.
  • Double-check whether multiple instances of the app or hidden background processes may be affecting recognition.

:robot: AI-assisted response.
:speech_balloon: Found the answer helpful? Give it a Kudos by clicking Like!
:white_check_mark: Got your issue resolved? Click Mark as Solution so others can find it quickly.

Originally posted by JAvila1234 on September 02, 2025

Dear Hassan, thanks for sharing this info - this is not my question thread (just lurking since I have same issue), so I leave J.Gibbs to decide if this resolves…

Reading info you shared, seems the nameMapping needs to be performed again and again, after new nameMappings are added or changed :frowning: Also what about mapping of three (or four or five..) NameMappings? is that even possible? Is there a limit?

All considered I still don’t see NameMapping value-added for my current project, and have disabled it. Thanks for sharing info all the same, perhaps may help a future project :slight_smile:

Originally posted by chkwto on September 04, 2025

I have encountered the same issue. When I call a function multiple time with namemapping in it the first time it works. The seconds time it doesn’t

Originally posted by scot1967 on September 08, 2025

I am don’t know if has been mentioned here (I haven’t read every post) but is the ‘Self Healing’ feature enabled? Sometimes this is a blessing and other times a curse. It depends on how well structured your application object tree is. It should show up in your logs if this feature is changing your mappings so I doubt this is the case.

… If you find my posts helpful drop me a like! :+1: Be sure to mark or post the solution to help others out and/or to credit the one who helped you. :smiling_face_with_sunglasses:

Originally posted by rraghvani on September 09, 2025

As mentioned by jgibbs343​, “issue may be caused by the fact that the software is not already open prior to running the test” - that’s the issue!

Originally posted by chkwto on September 09, 2025

I don’t use any self healing feature. We disable all the QA and AI feature.

rraghvani​ What do you mean with → “issue may be caused by the fact that the software is not already open prior to running the test” - that’s the issue!

Can you clarify it ?

Originally posted by rraghvani on September 09, 2025

Based on the users’ response, they didn’t have the application open when they ran their tests. Hence, TC was not able to find the mapped object.

Originally posted by jgibbs343 on September 09, 2025

For any who are reading this, I have a newer update. I have found that 15.71 to 15.72 update is when my name mapping broke. After further investigation I found that in upgrading the version caused my mapped object to identify as other Mapped Objects. I have submitted a support ticket about this, and will update again once i have more information. For the time being i have rolled back to 15.71

Originally posted by jgibbs343 on September 09, 2025

i found that essentially having a while loop that waits for your object to exist, helps. its like initially TestComplete doesnt see the object, but if you tell it to wait for it, it will find it.