cancel
Showing results for 
Search instead for 
Did you mean: 

"Parent" property is no longer available in Edit Name Mapping Item

Highlighted
New Contributor

"Parent" property is no longer available in Edit Name Mapping Item

Prior to v12.60 I am able to select Parent property in Edit Name Mapping Item. But now it is missing. A lot of other properties are gone as well. Any ideas on how to get it back?

 

Clipboard01.png

7 REPLIES 7
Highlighted
Community Hero

Re: "Parent" property is no longer available in Edit Name Mapping Item

I'm not sure how to get it back.  My guess is that there is probably a reason.  In looking at the property in Object Browser, the Parent property is an object, not a string or integer.

Is there a reason why you need to use the Parent property?  If you map the objects properly, the "parent" is already implied in the NameMapping hierarchy of objects.  If there's a particular problem you're trying to overcome with using that property, perhaps we can help with some alternatives.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
New Contributor

Re: "Parent" property is no longer available in Edit Name Mapping Item

I use the parent property to access parent objects and then use their property. This to make sure I use the right object (which is not unique with the exception of a certain parent object).

If this is no longer available in 12.60 then I'd probably have to downgrade. And I am not inclined to use scripts since all my tests are keywordtests.

Highlighted
Community Hero

Re: "Parent" property is no longer available in Edit Name Mapping Item

The parent property IS available for use in the tests.  You don't need to add the parent property to your mapping to use the parent within the automation itself.  

 

Additionally, if you map the parent object itself and then put the child object as a descendent in the mapping tree, it will ensure that you're always getting the proper child object.

 

So... no need to downgrade, just better usage of the objects and namemapping feature.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
New Contributor

Re: "Parent" property is no longer available in Edit Name Mapping Item

I mostly use that. But our WPF appication already have a humongous object tree. Even by using extended find, the namemapping are pretty long (the longer it is the more difficult it is to read). So sometimes I use Parent property just for a specific object.

Too bad Parent object is now gone. It was a nifty thing to use without breaking the namemapping.

Thanks anyhow.

Highlighted
Community Hero

Re: "Parent" property is no longer available in Edit Name Mapping Item

That's what Aliases are for.  You can shorten the hierarchy tree in the Alias part of NameMapping to excluded unnecessary objects in the tree.  They'll still be mapped in NameMapping as you have them mapped, but you don't need to utilize them in the Alias.

For example, 

NameMapping.Sys.MyApp.MyForm.MyPanel.MySubPanel.MyTextObject

 

can be "flattened" in the Aliases to just be

 

Aliases.MyApp.MyForm.MyTextObject

 

Read up on using Aliases in https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/name-mapping/abou...


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
Highlighted
New Contributor

Re: "Parent" property is no longer available in Edit Name Mapping Item

In our application it will add multitude of Namemapping for a single object at each recording. And it can get out of hand. And if I don't take control of Namemapping, the whole thing is unreadable and very hard to understand which objects are no longer working. I don't want generic stuff like Grids, ContentContainer, Borders, ContentPresenter, etc. in namemapping. If an alias doesn't work then I have to run through all those muck in namemapping.

For example, a full name (property) of a specific object in our wpf application will go up to 2933 chars in length with a treelevel of 43.

Sidenote: Ah.. good they put the treelevel back. Perhaps I can use this in stead of parent to solve my problem.

Highlighted
Community Hero

Re: "Parent" property is no longer available in Edit Name Mapping Item

The adding of multiple objects each time it records is not a problem with TestComplete... it's actually not a "problem".  What it means is that the properties being used by TestComplete in the automatic recording are insufficient for unique identification.  Alternatively, there could be a dynamic part of the properties being used that changes each time the test runs.

While automatic NameMapping is a good feature of TestComplete, it needs to be tempered with judicious editing and correcting of the mapping.  This is a best practice frequently discussed here on the forums.  

And, as mentione, that 2933 character lenght full name is something that you DON'T have to reference in your automation.  You map the object with the full tree... but then edit the Alias to "contract" the tree to only those parts you actually need in your tests.  Please reference the link in my previous post.  

NameMapping is a very good tool, when used well.  Some of the things you're trying to do with treelevel and parent are already handled by the NameMapping feature.


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors