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

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

Introduction

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

Prototype

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

Source Link

Document

An expectation for checking an element is visible and enabled such that you can click it.

Usage

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

License:Open Source License

public void clickCreateIcon() {
    new WebDriverWait(seleniumWebDriver, 7).until(ExpectedConditions.elementToBeClickable(createIcon));
    createIcon.click();
}

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

License:Open Source License

/** click on 'Import recursively' checkbox */
public void clickOnImportRecursivelyCheckbox() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.elementToBeClickable(importRecursively)).click();
}

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

License:Open Source License

/** click on 'Keep following directory' */
public void clickOnKeepDirectoryCheckbox() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.elementToBeClickable(keepFollowingDir)).click();
}

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

License:Open Source License

/** click on 'Branch' */
public void clickBranchCheckbox() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.elementToBeClickable(importBranch)).click();
}

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

License:Open Source License

public void waitAddButtonIsClickable(String goalName) {
    new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC).until(ExpectedConditions
            .elementToBeClickable(By.xpath(String.format(Locators.ADD_COMMAND_BUTTON_LOCATOR, goalName))));
}

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

License:Open Source License

public void chooseCommandTypeInContextMenu(String type) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(
                    By.xpath("//div[@class='popupContent']/select[contains(@class,'gwt-ListBox')]")));
    WebElement commandTypeElement = new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.elementToBeClickable(getCommandTypeElementInContextMenu(type)));
    commandTypeElement.click();//from  w  w w .java  2s  . c o  m
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.elementToBeSelected(commandTypeElement));
    // add timeout to be sure webelement ready to dbClick in some test got exception here
    WaitUtils.sleepQuietly(200, TimeUnit.MILLISECONDS);
    new Actions(seleniumWebDriver).doubleClick(commandTypeElement).perform();
}

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

License:Open Source License

/** expand exec dropdawn list */
public void selectProcessFromExecDropDawnAndStop(String commandName) {
    clickOnExecDropDawn();/*ww  w  . j a v a 2  s  .  c  om*/
    appearanceWait
            .until(ExpectedConditions
                    .elementToBeClickable(By.xpath(format(Locators.EXEC_COMMAND_SELECTOR, commandName))))
            .click();
}

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

License:Open Source License

/** Clicks on the 'OK' button */
public void clickOkButton() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.elementToBeClickable(okButton)).click();
}

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

License:Open Source License

/**
 * click on the icon of the multi split panel
 *
 * @param iconPosition is a position of split pane icon; the most right and lowest open pane has
 *     position number one/*from   www .j  av  a 2  s  . c o m*/
 */
public void clickOnIconMultiSplitPanel(int iconPosition) {
    loader.waitOnClosed();
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .elementToBeClickable(By.xpath(String.format(Locators.SPLIT_PANE_MENU_ICON, iconPosition))))
            .click();
}

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

License:Open Source License

/**
 * select command into split pane widget
 *
 * @param paneCommands is a name command
 *//*from ww w  . j av a 2s  . co m*/
public void selectCommandSplitPane(String paneCommands) {
    loader.waitOnClosed();
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .elementToBeClickable(By.xpath(String.format(Locators.SPLIT_PANE_COMMAND, paneCommands))))
            .click();
}