Forum Discussion
Correct, mapping all those components is a pain sometimes... but you only ever have to do it once and then they are identified and available for use in any test. Generally speaking, this is going to execute faster as well. Running script code to find your components means you're doing two things that are going to slow down your execution. First, you're running interpreted script code which will take longer than compiled internal methods (like NameMapping). Secondly, any "Find" method is going to take execution time.
What you're talking about doing, though, is something akin to a Page Object Model where you build a code unit whose only purpose is to identify a component and return it to the rest of the application. It can be done... but you're reinventing the wheel. You'd have to write the code to identify all the components... might as well map them.