Creates an object to store WebDriver elements on specific pages so subsequent lookups don’t require scanning the DOM.
Returns: | ElementCache (self) |
---|
Add an element to the cache. It is stored by a handle and deleted automatically after a full run.
Parameters: |
|
---|---|
Kwargs: |
|
Returns: | None |
Clears the internal cache, deleting all cached elements. Typically called after every run of our test function.
Returns: | None |
---|
Gets an element from the internal cache stored on the given url. If it doesn’t exist, returns None.
Parameters: | url – The current url to search the cache for. |
---|---|
Kwargs: |
|
Returns: | WebElement for the cached item if a matching element exists. None if not. |