Is there a way to cut out the long hierarchy when adding elements to Name Mapping
SOLVED- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Is there a way to cut out the long hierarchy when adding elements to Name Mapping
I have an element on the UI and when added to the name mapping repository it looks buried under a long hierarchy of panels, and this is how it appears when recording an action on this element
browser.pageEpadminstg.panel.panelVertical.panelTopPane.panelHorizontal.panelLeftPane.panel.panel.panelTabstrip.panelTabstrip1.panelNotificationsgrid.panel.buttonEvent.ClickButton()
I'm sure there is a high chance of some of the panel elements (basically div tags) getting removed/added if a developer makes a slight change to the layout, resulting in failure to identify the element. So is there a way to directly narrow down to the actual element like
browser.pageEpadminstg.buttonEvent.ClickButton()
It looks very simple when i use the xpath, but it gets very slow when executing on a VM -
HomePage.FindChildByXPath("//button[@id='addButton']").click()
I'm curious to hear from other users to understand how they manage their name mapping repositories.
Solved! Go to Solution.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Read up on "Extended Find". I typically do not have that turned on by default. But it is useful for compressing those DIV tags. Note that by using Extended Find, the trade off is on performance because it will take some time to search.
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Note, also, that there is a difference between a Mapped Object and the Aliase that you use in your automation. You can map a LOT more objects but then still compress them in your Alias to only those you need.
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
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Absolutely, this is exactly what the Alias part of mapping is for. You can keep the full tree mapped and rearrange your aliases to shorter more concise pieces.
Thanks,
Carson
Click the Accept as Solution button if my answer has helped
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you! very helpful
