public static ExpectedCondition < Boolean > invisibilityOf ( final WebElement element ) { return new ExpectedCondition < Boolean > ( ) { @ Override public Boolean apply ( WebDriver webDriver ) { return isInvisible ( element ) ; } @ Override public String toString ( ) { return "invisibility of " + element ; } } ; }
An expectation for checking the element to be invisible