Showing results for 
Search instead for 
Did you mean: 

Handling Reoccurring Objects (like navigation links)

0 Kudos

Handling Reoccurring Objects (like navigation links)

It would save a lot of time in maintainance if there were a way to link identical objects that happen to be on different pages to one master object.


Sort of like with templates but this controls the values. In other words, you may have several identical save buttons that would all inheret identification properties from one source. When the identificaton properties of the source are changed, so are all of the identification properties of the linked objects.


This way if the identification properties of the save buttons were to change, we would not have to update every mapped save button one at a time, we could instead update them all at once by changing the source. 

Community Hero

You can do this already in a way.  One of the things you can do with property values in NameMapping is indicate that the property value is set based upon a Project variable.  So, when you change the variable value, it updates the property value automatically in your NameMapping at runtime.



New Contributor

Interesting, I will take a look into this. 

Community Hero

You can set the variable up as having a "default value" that you can just set and forget.  You would only need to update that value as you need to when the application changes.  

New Contributor

@tristaanogre While recording, will TC check project variables and, if an identification propety matches a project vairable, automatically set that mapped object to refrence the project variable? Or is this something that would need to be done manually?

Community Hero

Well, it's not that it sets the OBJECT to reference the variable.  The variable populates the mapping criteria.  

Say, for example, you want to map the page object but you may change server boxes or root URL.  You can tell it to use the variable to replace the URL so that, rather than hardcoding the URL in your mapping criteria, it references the variable.

If you update the variable in code, you will need to use RefreshMappingInfo on your browser object to clear the cache of objects but, once you do so, the new value will be used as mapping criteria.