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

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

Introduction

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

Prototype

public static ExpectedCondition<WebElement> visibilityOf(final WebElement element) 

Source Link

Document

An expectation for checking that an element, known to be present on the DOM of a page, is visible.

Usage

From source file:org.eclipse.che.selenium.pageobject.OrganizeImports.java

License:Open Source License

/** wait dialog 'Organize Imports' is opened */
public void waitOrganizeImportsDialog() {
    new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(organizeImportsDialog));
}

From source file:org.eclipse.che.selenium.pageobject.OrganizeImports.java

License:Open Source License

/** click on 'Finish' button */
public void clickOnFinishButton() {
    new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(finishButton)).click();
}

From source file:org.eclipse.che.selenium.pageobject.OrganizeImports.java

License:Open Source License

/** click on 'Back' button */
public void clickOnBackButton() {
    new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC).until(ExpectedConditions.visibilityOf(backButton))
            .click();//from w  ww  .  jav a 2  s . com
}

From source file:org.eclipse.che.selenium.pageobject.OrganizeImports.java

License:Open Source License

/** click on 'Next' button */
public void clickOnNextButton() {
    new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC).until(ExpectedConditions.visibilityOf(nextButton))
            .click();/*w  ww  .j a va  2 s  .c om*/
}

From source file:org.eclipse.che.selenium.pageobject.Profile.java

License:Open Source License

public boolean profileFormExists() {
    try {/* w  w w.ja va2s  . c  o  m*/
        new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC)
                .until(ExpectedConditions.visibilityOf(seleniumWebDriver.findElement(By.id("firstName"))));
        return true;
    } catch (TimeoutException e) {
        return false;
    }
}

From source file:org.eclipse.che.selenium.pageobject.Profile.java

License:Open Source License

public boolean isGetStartedButtonPresent() {
    try {/*from  w ww .ja v  a  2 s  . co m*/
        new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC)
                .until(ExpectedConditions.visibilityOf(getStartedButton));
        return true;
    } catch (TimeoutException e) {
        return false;
    }
}

From source file:org.eclipse.che.selenium.pageobject.Profile.java

License:Open Source License

/** click on 'Get Started' button */
public void clickOnGetStarted() {
    new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(getStartedButton)).click();
}

From source file:org.eclipse.che.selenium.pageobject.Profile.java

License:Open Source License

/**
 * select role for the profile/*www  .  j  a  v a  2 s.co  m*/
 *
 * @param role
 */
public void selectRole(Role role) {
    Select select = new Select(new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(roleSelect)));
    select.selectByVisibleText(role.getRole());
}

From source file:org.eclipse.che.selenium.pageobject.Profile.java

License:Open Source License

/**
 * select country for the profile/*from   w ww .  ja  v a  2 s  . com*/
 *
 * @param country
 */
public void selectCountry(Country country) {
    Select select = new Select(new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(countySelect)));
    select.selectByVisibleText(country.getCountry());
}

From source file:org.eclipse.che.selenium.pageobject.SearchReplacePanel.java

License:Open Source License

/** Close 'Search and Replace' panel */
public void closeSearchReplacePanel() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(closeBtn)).click();
}