Forum Discussion
In my experience, I have found the best approach is to have a very minimal name mapping, and use Find methods in scripts to create a framework of global utilities that are shared among all projects that are testing a specific application.
- Colin_McCrae10 years agoCommunity Hero
I'm OK with helper functions such as those outlined by cunderw. I use them myself - alongside mapping. My caveat for those though is beware of the performance hit they can come with.
If you start every search at a very high level of an application, and the application has a busy object model, things can get very slow as it has to search for every object it needs before it can use it.
Not a "don't do it", more of a "beware".
Also, depending how you set these up, if you have reference calls to them all over your scripts, and something gets updated, I can see the situation arising where you're left raking through huge piles of script units looking for calls to helper functions to update the search parameters you're sending them.
Neither way is perfect. They both have their pro's and con's (hence why I use both). But both require a little forethought and planning to make them last well in the long term.