Forum Discussion

sriram_sig's avatar
sriram_sig
Contributor
6 years ago

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.

 

  • 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.

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    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.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      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.