Forum Discussion
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.
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.
- DodongAmaw6 years agoNew Contributor
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.- tristaanogre6 years agoEsteemed Contributor
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.MyTextObjectcan 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/about.html#aliases-and-mapped-objects
- DodongAmaw6 years agoNew Contributor
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.
Related Content
Recent Discussions
- 2 hours agoSubhraDas
- 21 hours agotramuntana