isVisible function
Checks if a PageLoaderElement/PageObject is visible.
A PageLoaderElement/PageObject is considered visible if it:
- exists
- isDisplayed
- isNotHidden
Does NOT check whether the element is on screen and unobscured.
Implementation
bool isVisible(item) {
final root = _rootElementOfAndRethrow(item, 'isVisible/isNotVisible');
return root.exists && root.displayed && !_isHidden(root);
}