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 section for easy access. Otherwise, I typically have to drill down 7 to 11 levels deep just to get to them.
Off the top of my head, make sure all names are unique. Else you get run time errors, or logic errors as TC references the wrong object.
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 😉