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

License:Open Source License

/** Click on close evaluate exp. button */
public void clickCloseEvaluateBtn() {
    String locator = "//button[text()='Evaluate']/preceding-sibling::button";
    new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locator))).click();
    new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC)
            .until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(locator)));
}

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

License:Open Source License

public void selectFrame(int frameIndex) {
    waitFramesListPanelReady();//from w  ww . j a v  a 2s. c  o  m

    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .visibilityOfElementLocated(By.xpath("//td[text()='" + getFrames()[frameIndex] + "']")))
            .click();
}

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

License:Open Source License

public void selectThread(String threadName) {
    waitThreadListPanelReady();/*from www  . j a  v a2s.c  om*/

    threads.click();
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions
                    .visibilityOfElementLocated(By.xpath("//*[contains(text(),'\"" + threadName + "\"@')]")))
            .click();
    threads.click();
}

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

License:Open Source License

public void waitBuildDetailsDialogIsOpen() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.id(BUILD_DETAILS_WINDOW)));
}

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

License:Open Source License

/** wait the 'Find Text' main form is open */
public void waitFindTextMainFormIsOpen() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.MAIN_FORM)));
}

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

License:Open Source License

/** close main form by pressing 'Cancel' button */
public void closeFindTextMainForm() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.CANCEL_BUTTON))).click();
    waitFindTextMainFormIsClosed();/*from  w w w . j  a  v a  2s  .c o m*/
}

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

License:Open Source License

/**
 * type text into 'Text to find' field//from ww w  .  j av a 2  s  .co  m
 *
 * @param text is text that need to find
 */
public void typeTextIntoFindField(String text) {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.FIND_TEXT_INPUT))).clear();
    loader.waitOnClosed();
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.FIND_TEXT_INPUT)))
            .sendKeys(text);
}

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

License:Open Source License

/** click on the 'Whole word only' checkbox */
public void clickOnWholeWordCheckbox() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.WHOLE_WORD_CHECKLBOX_SPAN)))
            .click();/*w ww . ja  va2s  .c  o m*/
}

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

License:Open Source License

/** click on the 'Search root' checkbox */
public void clickOnSearchRootCheckbox() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(Locators.SEARCH_ROOT_CHECKBOX_SPAN)))
            .click();/*from w  ww.jav a 2s .c  o  m*/
}

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

License:Open Source License

/** click on the 'File mask' checkbox */
public void clickOnFileMaskCheckbox() {
    new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC)
            .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(Locators.FILE_MASK_CHECKBOX_SPAN)))
            .click();//from   w w w. ja  v  a 2 s  .  c  om
}