cancel
Showing results for 
Search instead for 
Did you mean: 

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

SOLVED
Highlighted
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! 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Staff

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

that is odd that testcomplete has created two copies of the same object. in which case i dont think that you even need to do conditional name mapping, since you would only use conditional name mapping to account for an object having multiple acceptance criteria for what should be considered as its identification property.

in which case, you could go ahead and delete one of the two copies, and either go through the trouble of rearranging the children elements within the name mapping tree from aptifyshell2 to aptifyshell1, or start over again by mapping all of the children objects under the same alias.aptify_shell parent.

Best,
Justin Kim

View solution in original post

10 REPLIES 10
Highlighted
Community Leader

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

Hi,

 

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

Highlighted
Occasional Contributor

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

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

jamadarshivani_0-1599647060325.png

 

 

Highlighted
Community Leader

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

How do you run it in code?

 

Can You put here some example?

Highlighted
Occasional Contributor

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

@Wamboo 

Just an example:

 

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

Highlighted
Community Leader

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

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?

Highlighted
Staff

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

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
Highlighted
Occasional Contributor

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

@hkim5 

There is no difference it is the same thing

Highlighted
Staff

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

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
Highlighted
Occasional Contributor

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

@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 

New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors