Sunday 24 September 2017

TestComplete - Name Mapping

Name Mapping -

NameMapping is a collection of objects, where we can stored the object information by specifying objects properties and their particular values that the TestComplete engine will use for the object identification and perform the actions on it.

We have multiple option in TestComplete to add (stored) the objects in NameMapping-

1- Recording Test :- When a user records a test, the objects and its properties are stored by default in NameMapping.



2- Object Spy: - Object Spy is a inbuilt feature in TestComplete to identify the objects information and  add into the NameMapping.

To Add the Objects from Object Spy to NameMapping -> Show the object to Object spy -> Right Click the Object in Object Spy and select Map Object from the context menu.

(To Open Object Spy:1- Select Tools|Display Object Spy OR Toolbar option)


3- Object Browser :- The Object Browser shows running applications, the hierarchy of objects in applications, and object properties and methods.

To Add the Objects from Object Browser to NameMapping ->Right-click the object in the Object Browser and select Map Object from the context menu.

(To Open Object Browser : 1- Select View | Object Browser OR Click on Object Browser tab)




To be Continued .....

(Upcoming blogs :- NameMapping feature and use of NameMapping)


Wednesday 6 September 2017

How to Load/Activate NameMapping at run time in TestComplete

Suppose In your project, If you have multiple Name Mapping Configuration or Multiple Name Mapping File (repository) and you wanted to load/activate any specific Name Mapping configuration at run time, then yes TestComplete allow us to do this.

To Load/Activate the specific Name Mapping configuration at run time

          NameMapping.CurrentConfigurationName = "My_NM_Config_Name"

To know the current loaded/Activated NameMapping configuration at run time-

          My_NM_Config_Name = NameMapping.CurrentConfigurationName


For get the count of NameMapping configuration at run time

          My_NM_Config_Count = NameMapping.CurrentConfigurationCount

We can determine the Number of NameMapping configurations , name by using Index at run time

          My_NM_Config_Name = NameMapping.ConfigurationNames(0)

Note - NameMapping.ConfigurationNames(Index) Specifies the index of the desired NameMapping configuration. The index is zero-based.