Forum Discussion

ackmondual's avatar
ackmondual
Contributor
4 years ago
Solved

Any pitfalls with making most of the aliases on the root level?

I'm testing an Android app.  I've been building out the Namemapping and Aliases.  I'm wondering if there's anything I should be aware of if I copy most of the objects onto the root level of the Alias...
  • tphillips's avatar
    4 years ago

    Are you using keyword tests or scripting? If you're writing scripts you can assign your name mapping to variables, making that the new root.

    e.g. mainPage = Aliases.App.HwndSource_Window.Window.MainFrame.MainPage;

     

    You can do this for keyword tests by setting a project-wide variable and using that.

     

    I would think it's generally not a good idea to copy them to the root level, unless you can be sure they're all unique and they have unique identification properties. They're in a hierarchy for a reason 😉