Forum Discussion
Hi,
Not sure how did you map the objects & what all properties your have selected to identify the object uniqly.
Please try to the following method
For NameMapping.Sys.StaadFoundation.Item_27.Afx:
If there is property which has something mentioned with number please replace the [only]number with the "*" so that it will work whenever you run the project.
For Aliases.StaadFoundation.Item_27.Afx
Check the selected property which you have used for identification.
Also please show us the snapshot of Aliases.StaadFoundation.Item_27.Afx object , so that we will come to know what all properties you have mentioned to identify this object uniquely.
If the selected property keeps changing everytime you run the project , follow the below mentioned method
Below explanation is just a copy-paste from TC help file:
The names that TestComplete gives by default to test objects (processes, windows and controls) are a combination of various object properties that specify the object type and contents. These names are good unique identifiers of the objects among their siblings. However, these names may be long or hard to understand. For instance, it may be difficult to understand which text box on screen corresponds to a name like Sys.Process("MyApp").Window("MyFormClass", "Input Order", 1).Window("TextEdit", "", 2).
So, the TestComplete engine lets you assign custom names to processes, windows, controls and other objects, or, in other words, you can map an object to another name. The two main benefits of there feature include - -
Making your keyword tests and scripts shorter and more readable (a custom name, say, EditorWindow is shorter and more user-friendly than Sys.Process("Editor").Window("Editor", "*", -1)).
Making keyword tests, scripts and the object names independent on object properties, which may change from one application build to another.
To create a custom name for an object, use the NameMapping project item. It acts as a collection of name mapping settings, that is, it defines which custom name corresponds to which object.
When mapping the object’s name to a custom one, you specify properties and their particular values which are used to identify this object. For instance, you can assign the mapped name notepad to the Process("notepad") whose Name property is notepad and Index is 2. These properties and their values are stored in the corresponding name mapping item along with the custom object name. TestComplete then uses these properties to recognize the mapped object during test recording and playback.