List of usage examples for org.openqa.selenium.support.ui ExpectedConditions presenceOfElementLocated
public static ExpectedCondition<WebElement> presenceOfElementLocated(final By locator)
From source file:org.eclipse.che.selenium.pageobject.git.GitPanel.java
License:Open Source License
/** * Waits until given repository presents in the repositories list. * * @param repository name of repository to wait for *//*www .j a va 2 s . c o m*/ public void waitRepositoryPresent(String repository) { loadWait.until(ExpectedConditions .presenceOfElementLocated(By.xpath(String.format(Locators.REPOSITORY_BY_NAME, repository)))); }
From source file:org.eclipse.che.selenium.pageobject.git.GitPanel.java
License:Open Source License
/** * Waits for file to be present in changes file list. * * @param filename name of file/* w w w.ja v a2 s.c o m*/ */ public void waitFileInChangesList(String filename) { loadWait.until(ExpectedConditions .presenceOfElementLocated(By.xpath(String.format(Locators.CHANGED_FILE_BY_NAME, filename)))); }
From source file:org.eclipse.che.selenium.pageobject.GoogleLogin.java
License:Open Source License
public void clickApproveButton() { (new WebDriverWait(seleniumWebDriver, 10)) .until(ExpectedConditions.presenceOfElementLocated(By.id(Locators.APPROVE_BUTTON))); WebElement approveBtn = (new WebDriverWait(seleniumWebDriver, 10)) .until(ExpectedConditions.elementToBeClickable(By.id(Locators.APPROVE_BUTTON))); approveBtn.click();/*from w w w . j a va2 s . c o m*/ WaitUtils.sleepQuietly(1); }
From source file:org.eclipse.che.selenium.pageobject.IdeMainDockPanel.java
License:Open Source License
public void runCommandFromCreateIconList(String createMenuCommand) { (new WebDriverWait(seleniumWebDriver, 7) .until(ExpectedConditions.presenceOfElementLocated(By.id(createMenuCommand)))).click(); new WebDriverWait(seleniumWebDriver, 3) .until(ExpectedConditions.invisibilityOfElementLocated(By.id(createMenuCommand))); }
From source file:org.eclipse.che.selenium.pageobject.Profile.java
License:Open Source License
/** * enter value into field/*w ww .ja v a 2s . c o m*/ * * @param value text for field * @param field name Of field */ public void enterValueInField(String value, Field field) { new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.presenceOfElementLocated(By.id(field.getFieldId()))).clear(); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.presenceOfElementLocated(By.id(field.getFieldId()))).sendKeys(value); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.textToBePresentInElementValue(By.id(field.getFieldId()), value)); }
From source file:org.eclipse.che.selenium.pageobject.subversion.SvnCommit.java
License:Open Source License
/** * wait the text into 'Commit...' diff view * * @param expContent is the expected text *//*from ww w .j ava 2s. c o m*/ public void waitTextDiffView(final String expContent) { new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC) .until(ExpectedConditions.presenceOfElementLocated(By.xpath(Locators.TEXT_AREA_DIFF_VIEW))); seleniumWebDriver.switchTo().frame(textAreaDiffView); new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC) .until((ExpectedCondition<Boolean>) webDriver -> seleniumWebDriver.findElement(By.tagName("pre")) .getText().contains(expContent)); seleniumWebDriver.switchTo().defaultContent(); }
From source file:org.eclipse.che.selenium.pageobject.subversion.SvnCopy.java
License:Open Source License
public void waitItem(String path, int timeout) throws Exception { String locator = "//div[@path='/" + path + "']/div"; new WebDriverWait(seleniumWebDriver, timeout) .until(ExpectedConditions.presenceOfElementLocated(By.xpath(locator))); }
From source file:org.eclipse.che.selenium.pageobject.subversion.SvnMerge.java
License:Open Source License
public void waitItem(String path, int timeout) throws Exception { String locator = "//div[@id='gwt-debug-plugin-svn merge-dialog']//span[text()='" + path + "']"; new WebDriverWait(seleniumWebDriver, timeout) .until(ExpectedConditions.presenceOfElementLocated(By.xpath(locator))); }
From source file:org.eclipse.che.selenium.pageobject.UploadFile.java
License:Open Source License
public void waitUploadButtonIsDisabled() { new WebDriverWait(seleniumWebDriver, 10) .until(ExpectedConditions.presenceOfElementLocated(By.id(Locators.UPLOAD_FILE_BUTTON))) .getAttribute("disabled"); }
From source file:org.eclipse.che.selenium.pageobject.UploadFolderFromZip.java
License:Open Source License
public void waitUploadButtonIsDisabled() { new WebDriverWait(seleniumWebDriver, 10) .until(ExpectedConditions.presenceOfElementLocated(By.id(Locators.UPLOAD_FOLDER_ZIP_BUTTON))) .getAttribute("disabled"); }