Forum Discussion

mathieuleb's avatar
mathieuleb
Contributor
10 years ago
Solved

Name mapping refresh problem

Hi, we use a custom control to handle different action base on the context.  Each control have a unique ID, but the name mapping doesn't seem to work correctly when we reuse a control. ex: C...
  • jmcpeek's avatar
    10 years ago
    If I'm understanding you correctly, you have 2 different IDs to identify the same object at different points. Name mapping allows that, but you need to enter Conditional Mode (the button on the lower-left) and construct the different variations. Once you've done that, it should work as expected.



    It makes sense when you think about it from TestComplete's perspective. You have an object on the screen identified by an ID. When the application changes the ID of the object (even if it's really the same object), TC doesn't see the object any more.



    The reason the ID changes when you re-add the property is because TC is populating the value with what's available at the time you map it. Apparently, that's different when you're re-adding vs when you mapped it originally.



    And you may already be doing this (or if I'm completely missing what you're saying), I always like to throw in a mapping refresh before I call something when objects change without a full page refresh:



    aliases.objectName.refreshMappingInfo