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

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

Introduction

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

Prototype

public static ExpectedCondition<WebElement> visibilityOfElementLocated(final By locator) 

Source Link

Document

An expectation for checking that an element is present on the DOM of a page and visible.

Usage

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardProject.java

License:Open Source License

/**
 * open settings for project by name in the 'All projects' tab
 *
 * @param projectName name of project//from  ww  w .  j  av  a 2  s .  c o  m
 */
public void openSettingsForProjectByName(String projectName) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .visibilityOfElementLocated(By.xpath(String.format(Locators.PROJECT_BY_NAME, projectName))))
            .click();
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardProject.java

License:Open Source License

/** click on 'DELETE' button in settings of project */
public void clickOnDeleteProject() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(Locators.DELETE_PROJECT))).click();
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardProject.java

License:Open Source License

/** click on 'DELETE IT!' button in the confirming window */
public void clickOnDeleteItInDialogWindow() {
    WaitUtils.sleepQuietly(1);/*from w w w . j ava2s  .  c  om*/
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(Locators.DELETE_IT_PROJECT))).click();
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardProject.java

License:Open Source License

/** Click on 'Skip the root folder of the archive' */
public void clickOnSkipRootFolder() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(Locators.SKIP_ROOT_FOLDER))).click();
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardWorkspace.java

License:Open Source License

public void waitToolbarTitleName(String titleName) {
    new WebDriverWait(seleniumWebDriver, TestTimeoutsConstants.LOADER_TIMEOUT_SEC).until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath(format(Locators.TOOLBAR_TITLE_NAME, titleName))));
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardWorkspace.java

License:Open Source License

public void selectWorkspaceItemName(String wsName) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .visibilityOfElementLocated(By.xpath(format(Locators.WORKSPACE_ITEM_NAME, wsName))))
            .click();/*from   w  w w.ja v  a 2  s  .  c  om*/
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardWorkspace.java

License:Open Source License

public void selectRecipeType(String recipeType) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .visibilityOfElementLocated(By.xpath(format(Locators.RECIPE_TYPE_BUTTON, recipeType))))
            .click();//from w w w. j a  va 2s. c  om
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardWorkspace.java

License:Open Source License

/** set the focus into 'recipe-editor' form in the 'Stack authoring' */
public void clickIntoWorkspaceRecipeEditor() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(Locators.RECIPE_EDITOR))).click();
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardWorkspace.java

License:Open Source License

/**
 * wait the warning message when there is two or more machines
 *
 * @param mess is the message into workspace machine config
 *//*from  w  ww .  j ava2s  .c  om*/
public void waitWarningMessage(String mess) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(
            ExpectedConditions.visibilityOfElementLocated(By.xpath(String.format(Locators.WARNING_MSG, mess))));
}

From source file:org.eclipse.che.selenium.pageobject.dashboard.DashboardWorkspace.java

License:Open Source License

/**
 * switch the config machine/*from  ww  w  .jav a  2  s  .c  om*/
 *
 * @param nameMachine is the machine name
 */
public void switchConfigMachine(String nameMachine) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath(String.format(Locators.CONFIG_MACHINE_SWITCH, nameMachine))))
            .click();
}