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.DashboardFactory.java

License:Open Source License

/** wait any factory url after creation a factory */
public void waitFactoryUrl() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?id=")));
}

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

License:Open Source License

/**
 * wait Select Source widget and select od source type
 *
 * @param sourceType/*from   w ww .ja  v a2 s  .  co  m*/
 */
public void waitSelectSourceWidgetAndSelect(String sourceType) {
    String locatorPref = "//span[@class[contains(.,'che-tab-label-title')]and text()='" + sourceType + "']";
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locatorPref))).click();
}

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

License:Open Source License

/** click on current factory id Url */
public void clickFactoryIDUrl() {
    waitFactoryUrl();//from   w  ww  .j av a2  s .c om
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?id="))).click();
}

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

License:Open Source License

/** click on current factory id Url */
public void clickNamedFactoryUrl() {
    waitFactoryUrl();//from   www .  j  av  a2 s  .co m
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?name=")))
            .click();
}

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

License:Open Source License

/** click on current factory id Url */
public void clickFactoryNamedUrl() {
    waitFactoryUrl();/*ww  w .  j  a v a  2 s  .  c  om*/
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.partialLinkText(ideUrl + "f?name=")))
            .click();
}

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

License:Open Source License

/**
 * select existing workspace in the 'Select Workspace' tab when create new project
 *
 * @param wsName is name of the existing workspace
 *//* w  ww  .j a v  a2  s. c  o m*/
public void selectExistingWs(String wsName) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(Locators.EXISTING_WS_RADIO_BUTTON)))
            .click();
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .visibilityOfElementLocated(By.xpath(String.format(Locators.SELECT_EXISTING_WS, wsName))))
            .click();
}

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

License:Open Source License

/**
 * select template project in the 'STACK LIBRARY' tab
 *
 * @param projectName is name of the existing template project
 *///w w  w .  jav a  2 s  .co  m
public void selectTemplateProject(String projectName) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath(String.format(Locators.SELECT_TEMPLATE_PROJECT, projectName))))
            .click();
}

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

License:Open Source License

/**
 * Select source in the 'New Project' tab
 *
 * @param nameSource name os source/*from   w ww . ja  v a2 s  . c  o  m*/
 */
public void selectSource(String nameSource) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath(String.format(Locators.SELECT_SOURCE_ITEM, nameSource))))
            .click();
}

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

License:Open Source License

/**
 * Select existing location for import project in the 'New Project' tab
 *
 * @param location name of location/*w ww . j a  v a 2  s  .c o  m*/
 */
public void selectExistingLocation(String location) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .visibilityOfElementLocated(By.xpath(String.format(Locators.LOCATION_TAB, location))))
            .click();
}

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

License:Open Source License

/**
 * wait the project is present in the 'All projects' tab
 *
 * @param projectName name of project//w w  w .j a v a 2 s  .  co  m
 */
public void waitProjectIsPresent(String projectName) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(ExpectedConditions
            .visibilityOfElementLocated(By.xpath(String.format(Locators.PROJECT_BY_NAME, projectName))));
}