public static ExpectedCondition < WebElement > presenceOfElementLocated ( final By locator ) { return new ExpectedCondition < WebElement > ( ) { @ Override public WebElement apply ( WebDriver driver ) { return driver . findElement ( locator ) ; } @ Override public String toString ( ) { return "presence of element located by: " + locator ; } } ; }
An expectation for checking that an element is present on the DOM of a page . This does not necessarily mean that the element is visible .