Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cache elements found by the locator via 'cacheLookup' annotation #94

Open
aik099 opened this issue Aug 29, 2014 · 0 comments
Open

Cache elements found by the locator via 'cacheLookup' annotation #94

aik099 opened this issue Aug 29, 2014 · 0 comments
Assignees
Milestone

Comments

@aik099
Copy link
Member

aik099 commented Aug 29, 2014

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant