|
Answer» Some of the commonly used expected conditions of an element that can be used with explicit waits are- - elementToBeClickable(WebElement element or By locator) - An expectation for checking an element is visible or not and enabled so that you can click on it.
- stalenessOf(WebElement element) - will Wait until an element is no longer ATTACHED to the DOM or TIMEOUT expires.
- visibilityOf(WebElement element) - visibilityOf(WebElement element) is used for checking that an element is present on the DOM of a page and visible.
- visibilityOfElementLocated(By locator) - Used to check if the element is present on the DOM of a page and it is visible.
- invisibilityOfElementLocated(By locator) - invisibilityOfElementLocated(By locator) used for checking an element is invisible or not present in the DOM.
- attributeContains(WebElement element, String attribute, String VALUE) - Waits for a certain text fragment to appear in the attribute.
- alertIsPresent() - alertIsPresent(), accepts any present alert. and returns TRUE if there is an alert to click
- titleContains(String TITLE) - titleContains(String title) used for checking that the title of a page contains a case-sensitive substring.
- titleIs(String title) - wait till the title of the page is the same as mentioned in the attribute.
- textToBePresentInElementLocated(By, String) - wait till expected text appears on targeted element.
|