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.intelligent.CommandsPalette.java

License:Open Source License

public void closeCommandPalette() {
    redrawUiElementTimeout.until(ExpectedConditions.visibilityOf(closeCommandPalette)).click();
    redrawUiElementTimeout/*from  w  w w .j  a  va2s. c  o  m*/
            .until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(Locators.COMMAND_PALETTE)));
    loader.waitOnClosed();
}

From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsPalette.java

License:Open Source License

/**
 * Search and start command by name/*from w ww.  j  ava  2 s .co m*/
 *
 * @param commandName name of the command
 */
public void searchAndStartCommand(String commandName) {
    redrawUiElementTimeout.until(ExpectedConditions.visibilityOf(searchField)).sendKeys(commandName);
    loader.waitOnClosed();
}

From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsPalette.java

License:Open Source License

public void clearSearchField() {
    redrawUiElementTimeout.until(ExpectedConditions.visibilityOf(searchField)).clear();
    redrawUiElementTimeout.until(ExpectedConditions.visibilityOf(searchField)).sendKeys(Keys.ENTER);
    loader.waitOnClosed();//from www.  ja v  a2s.  com
}

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

License:Open Source License

/** Waits the 'key bindings form' is open */
public void waitKeyBindingsFormIsOpened() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(keyBindingsForm));
}

From source file:org.eclipse.che.selenium.pageobject.machineperspective.CreateMachineWidget.java

License:Open Source License

/** wait main widget for creating new machine */
public void waitCreateMachinesWidget() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(mainForm));
}

From source file:org.eclipse.che.selenium.pageobject.machineperspective.CreateMachineWidget.java

License:Open Source License

/**
 * type the name of mashine into 'Name' field of the 'Create Machine' widget
 *
 * @param nameOfMachine/*from  ww w  . java  2 s .com*/
 */
public void typeNameOfMachine(String nameOfMachine) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(nameOfMashineField)).sendKeys(nameOfMachine);
    new WebDriverWait(seleniumWebDriver, MINIMUM_SEC).until((WebDriver input) -> {
        return nameOfMashineField.getAttribute("value").equals(nameOfMachine);
    });
}

From source file:org.eclipse.che.selenium.pageobject.machineperspective.CreateMachineWidget.java

License:Open Source License

/**
 * type the tag name of mashine into 'Name' field of the 'Create Machine' widget
 *
 * @param tagName/*from  w  w  w .j a  v  a  2 s  .  co  m*/
 */
public void typeFindByTags(String tagName, boolean withClearing) {
    WebElement currentElem = new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(findByNAmeField));
    if (withClearing) {
        currentElem.clear();
        //for server side
        WaitUtils.sleepQuietly(1);
        currentElem.sendKeys(tagName);
    } else {
        currentElem.sendKeys(tagName);
    }
}

From source file:org.eclipse.che.selenium.pageobject.machineperspective.CreateMachineWidget.java

License:Open Source License

/** wait and click on the create button of 'Create Machine' widget */
public void clickCreateBTn() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(createBtn)).click();
}

From source file:org.eclipse.che.selenium.pageobject.machineperspective.CreateMachineWidget.java

License:Open Source License

/** wait and click on the create button of 'Cancel Machine' widget */
public void clickCancelBtn() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(cancelBtn)).click();
}

From source file:org.eclipse.che.selenium.pageobject.machineperspective.MachineInformationTab.java

License:Open Source License

/** wait appearance the main terminal container */
public void waitInformationTab() {
    new WebDriverWait(seleniumWebDriver, LOADER_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(informationTab));
}