aik099/qa-tools — pull request #36 by aik099 (2014-05-05 14:02:40+00:00)
Title: Cache elements found by the locator via 'cacheLookup' annotation

In the Java version of Selenium there was a `@cacheLookup` annotation that allowed to cache found `WebElement` class objects right inside of the `ElementLocator` class that searched for them.

If ElementLocator is to be used as a standalone component, then it might make sense, but the `PageFactory` is creating a separate locator class per each Page/ElementContainer class property it decorates and only accesses it once when element is being used, so caching doesn't really make sense.

We might implement the caching if somebody will be using ElementLocator in custom factory to save on calls made to the browser for element location. This cache however might result in stale element returning, that is no longer present in DOM.