Example usage for org.openqa.selenium.support.ui ExpectedConditions invisibilityOf

List of usage examples for org.openqa.selenium.support.ui ExpectedConditions invisibilityOf

Introduction

In this page you can find the example usage for org.openqa.selenium.support.ui ExpectedConditions invisibilityOf.

Prototype

public static ExpectedCondition<Boolean> invisibilityOf(final WebElement element) 

Source Link

Document

An expectation for checking the element to be invisible

Usage

From source file:com.consol.citrus.selenium.actions.WaitUntilAction.java

License:Apache License

@Override
protected void execute(WebElement webElement, SeleniumBrowser browser, TestContext context) {
    WebDriverWait q = new WebDriverWait(browser.getWebDriver(), Math.round(timeout / 1000));

    if (condition.equals("hidden")) {
        q.until(ExpectedConditions.invisibilityOf(webElement));
    } else if (condition.equals("visible")) {
        q.until(ExpectedConditions.visibilityOf(webElement));
    } else {/*  w  w w. j  a  v  a  2 s .  c  o m*/
        throw new CitrusRuntimeException("Unknown wait condition");
    }
}