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.debug.CppDebugConfig.java

License:Open Source License

@Override
void expandDebugCategory() {
    new WebDriverWait(seleniumWebDriver, ATTACHING_ELEM_TO_DOM_SEC)
            .until(ExpectedConditions.visibilityOf(debugCategoryExpandIcon)).click();
}

From source file:org.eclipse.che.selenium.pageobject.debug.DebugPanel.java

License:Open Source License

/** Wait while the Variables panel appears */
public void waitVariablesPanel() {
    new WebDriverWait(seleniumWebDriver, 20).until(ExpectedConditions.visibilityOf(variablesPanel));
}

From source file:org.eclipse.che.selenium.pageobject.debug.DebugPanel.java

License:Open Source License

/** Wait appearance change variable form */
public void waitAppearChangeVariableForm() {
    new WebDriverWait(seleniumWebDriver, 20).until(ExpectedConditions.visibilityOf(changeVariableTextAreaForm));
}

From source file:org.eclipse.che.selenium.pageobject.debug.NodeJsDebugConfig.java

License:Open Source License

/**
 * Set path defined by user to js. file/*from  w w  w. j a  v a2 s.  co m*/
 *
 * @param pathToNodeJsFile the defined path
 */
public void setPathToScriptForNodeJs(String pathToNodeJsFile) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(scriptNodeJsField)).clear();
    scriptNodeJsField.sendKeys(pathToNodeJsFile);
}

From source file:org.eclipse.che.selenium.pageobject.debug.PhpDebugConfig.java

License:Open Source License

/** Create debug configuration and close dialog. */
public void createConfig(String configName, boolean breakAtFirstLine, int debugPort) {
    createConfigWithoutClosingDialog(configName);

    // set debug port
    new WebDriverWait(seleniumWebDriver, ATTACHING_ELEM_TO_DOM_SEC)
            .until(ExpectedConditions.visibilityOf(debugPortInput));
    debugPortInput.clear();/*w  ww . j  av  a2  s .co m*/
    debugPortInput.sendKeys(String.valueOf(debugPort));

    // setup "break at first line" checkbox
    ensureBreakAtFirstLineCheckboxState(breakAtFirstLine);

    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(configSaveBtn)).click();

    close();
}

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

License:Open Source License

/** wait project events tab */
public void waitEventLogBtn() {
    new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(eventLogBtn));
}

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

License:Open Source License

/** Clear opened and closed panel */
public void clearAllMessages() {
    List<WebElement> messageCloseIcons = seleniumWebDriver.findElements(By.xpath(CLOSE_EVENT_ICON));
    for (WebElement messageCloseIcon : messageCloseIcons) {
        new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
                .until(ExpectedConditions.visibilityOf(messageCloseIcon));
        messageCloseIcon.click();//w  ww . j  a  v  a 2s . c  o m
    }
    waitEmptyEventsPanel();
}

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

License:Open Source License

/** wait the 'Enter Action' form is open */
private void waitEnterActionFormIsOpen() {
    new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOf(enterActionForm));
}

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

License:Open Source License

/** type text into 'Find Action' form */
public void typeTextIntoFindActionForm(String text) {
    waitEnterActionFormIsOpen();//  w ww. j a v a  2s.c  o m
    clearTextBoxActionForm();
    for (char symbol : text.toCharArray()) {
        waitWithRedrawTimeout.until(ExpectedConditions.visibilityOf(textBoxActionForm))
                .sendKeys(Character.toString(symbol));
    }
    waitWithRedrawTimeout.until(ExpectedConditions.textToBePresentInElementValue(textBoxActionForm, text));
}

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

License:Open Source License

/** clear text into 'Enter action name:' input */
public void clearTextBoxActionForm() {
    waitWithRedrawTimeout.until(ExpectedConditions.visibilityOf(textBoxActionForm)).clear();
}