List of usage examples for org.openqa.selenium.support.ui ExpectedConditions visibilityOfElementLocated
public static ExpectedCondition<WebElement> visibilityOfElementLocated(final By locator)
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
/** * type text into 'FileNameFilter' field * * @param text is symbol or string/*www . ja v a2 s . c o m*/ */ public void typeTextIntoFileNameFilter(String text) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.FILE_MASK_FIELD))).clear(); loader.waitOnClosed(); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.FILE_MASK_FIELD))) .sendKeys(text); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
public String getFindInfoResults() { loader.waitOnClosed();/*from w w w. ja v a 2 s . co m*/ return new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.SEARCH_RESULTS))).getText(); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
public void clickOnPreviousPageButton() { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.PREVIOUS_BUTTON))).click(); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
public void clickOnNextPageButton() { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.NEXT_BUTTON))).click(); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
public void openFileNodeByDoubleClick(String pathToFile) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions .visibilityOfElementLocated(By.xpath(String.format(Locators.FILE_NODE, pathToFile)))) .click();/* ww w .j av a2 s . com*/ actionsFactory.createAction(seleniumWebDriver).doubleClick().perform(); }
From source file:org.eclipse.che.selenium.pageobject.FindText.java
License:Open Source License
public SearchFileResult getResults() { String text = new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.id(Locators.SEARCH_RESULTS))).getText(); return new SearchFileResult(text); }
From source file:org.eclipse.che.selenium.pageobject.git.GitBranches.java
License:Open Source License
/** wait branch with specified name */ public void waitBranchWithName(String nameOfBranch) { new WebDriverWait(seleniumWebDriver, 5).until(ExpectedConditions.visibilityOfElementLocated( By.id(String.format(Locators.BRANCH_NAME_IN_LIST_PREFIX, nameOfBranch)))); }
From source file:org.eclipse.che.selenium.pageobject.git.GitBranches.java
License:Open Source License
/** * select given branch check enabled or not button checkout * * @param nameOfBranch is name of branch */// ww w.ja va 2s . c o m public void selectBranchAndCheckEnabledButtonCheckout(final String nameOfBranch) { new WebDriverWait(seleniumWebDriver, 5).until(new ExpectedCondition<Boolean>() { @Override public Boolean apply(WebDriver webDriver) { new WebDriverWait(seleniumWebDriver, 5).until(ExpectedConditions.visibilityOfElementLocated( By.id(String.format(Locators.BRANCH_NAME_IN_LIST_PREFIX, nameOfBranch)))).click(); return seleniumWebDriver.findElement(By.id(Locators.CHECKOUT_BTN_ID)).isEnabled(); } }); }
From source file:org.eclipse.che.selenium.pageobject.git.GitCommit.java
License:Open Source License
/** * Click the check-box of the item in the 'Git changed files tree panel'. * * @param itemName name of the item/*from w w w .j ava 2 s . c o m*/ */ public void clickItemCheckBox(String itemName) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(ExpectedConditions .visibilityOfElementLocated(By.xpath(String.format(Locators.TREE_ITEM_CHECK_BOX, itemName)))) .click(); }
From source file:org.eclipse.che.selenium.pageobject.git.GitMerge.java
License:Open Source License
public void waitItemInMergeList(String branchName) { new WebDriverWait(seleniumWebDriver, 7).until(ExpectedConditions .visibilityOfElementLocated(By.xpath(String.format(Locator.ITEM_IN_TREE, branchName)))); }