Ask a Question

Different name mapping for same object with same Test complete version and same project

SOLVED
jamadarshivani
Occasional Contributor

Different name mapping for same object with same Test complete version and same project

When I first recorded scripts Name mapping was Aliases.Aptify_Shell.AptifyShellForm and now it is Aliases.Aptify_Shell2.AptifyShellForm whereas the project is the same. Aptify_Shell and Aptify_Shell2 is the change that has taken place. Is there any fix for it? 

 

Thank you! 

10 REPLIES 10
Wamboo
Community Hero

Hi,

 

Use conditional mapping mode -> add new values for this object.

jamadarshivani
Occasional Contributor

Tried conditional mapping mode but does not work. Please check the image attached below 

jamadarshivani_0-1599647060325.png

 

 

How do you run it in code?

 

Can You put here some example?

jamadarshivani
Occasional Contributor

@Wamboo 

Just an example:

 

Aliases.Aptify_Shell2.AptifyShellForm.WindowDockingArea2.DockableWindow2.aptifyTree.tvwMain.ClickItem("advance> Home");

and see if you can't help using the feature:

 

.refreshMappingInfo();

 

or save this object to a variable and search for it with .Find() using the appropriate conditions.

 

You will need to write a custom function for this.

 

Or maybe there are other fields by which you can distinguish this object?

hkim5
Staff

what is the difference in terms of the identification properties for Aliases.Aptify_Shell vs Aliases.Aptify_Shell2?

spot that difference, and use either the conditional name mapping as mentioned above, or regexp to account for the marginal differences between the two aliases. 

Best,
Justin Kim
jamadarshivani
Occasional Contributor

@hkim5 

There is no difference it is the same thing

unless you retroactively edited the identification properties of the two alias objects, there is almost no way that that is possible (if you used the record and replay functionality to automatically map your objects). the difference could be as small as one character or digit, process number, object identifier, or whatever else. Otherwise, Testcomplete could not have created a second "copy" of the same object, since the object under question would already have been mapped and identified under those properties. 

i have objects that are being incremented at the alias level because of a single backslash being used in identifying the second process as a second object. now i can go ahead and edit the properties to account for the fact that a backslash maybe present in my URL and have that not affect the way things are identified. 

could you give us the screenshots of what you are seeing for the identification properties of alias.shell1 and shell 2?

hkim5_0-1599660409943.png

hkim5_1-1599660440794.png

 

 

Best,
Justin Kim
jamadarshivani
Occasional Contributor

@hkim5 

Both have same Process Name that is Aptify Shell but conditional mapping does not work .

 

jamadarshivani_0-1599662484725.png

jamadarshivani_1-1599662514630.png

I have added an image of conditional mapping in the above comments 

cancel
Showing results for 
Search instead for 
Did you mean: