List of usage examples for org.openqa.selenium.support.ui ExpectedConditions visibilityOf
public static ExpectedCondition<WebElement> visibilityOf(final WebElement element)
From source file:org.awesomeagile.webapp.page.LandingPage.java
License:Apache License
public LandingPage waitForDefinitionOfReady() { wait.until(ExpectedConditions.visibilityOf(viewDefinitionOfReadyButton)); return this; }
From source file:org.awesomeagile.webapp.page.LandingPage.java
License:Apache License
public LandingPage waitForDefinitionOfDone() { wait.until(ExpectedConditions.visibilityOf(viewDefinitionOfDoneButton)); return this; }
From source file:org.cybercat.automation.components.PageElement.java
License:Apache License
protected boolean waitPresent() { if (state.equals(ElementState.CREATED)) return false; try {// w ww . j a v a 2 s. com processor.getWait().until(ExpectedConditions.visibilityOf(element)); } catch (Exception e) { log.warn("\"" + getName() + "\" element is not visible."); return false; } return true; }
From source file:org.eclipse.che.selenium.miscellaneous.CheckCreatingProjectInEmptyWsTest.java
License:Open Source License
@Test(priority = 1) public void checkImportAndCreatingFromEditorPanel() { WebDriverWait waitForWebElements = new WebDriverWait(ide.driver(), LOAD_PAGE_TIMEOUT_SEC); String locatorToEditorContaiPaineId = "//div[@id='gwt-debug-editorMultiPartStack-contentPanel']"; String locatorToImportProjectLnk = locatorToEditorContaiPaineId + "//div[text()='Import Project...']"; String locatorToCreateProjectLnk = locatorToEditorContaiPaineId + "//div[text()='Create Project...']"; loader.waitOnClosed();/* w ww .j a va 2 s .c om*/ waitForWebElements.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locatorToImportProjectLnk))) .click(); importProjectFromLocation.closeWithIcon(); waitForWebElements.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locatorToCreateProjectLnk))) .click(); wizard.closeWithIcon(); waitForWebElements .until(ExpectedConditions.visibilityOfElementLocated((By.xpath(locatorToEditorContaiPaineId)))) .click(); try { actionsFactory.createAction(ide.driver()).sendKeys(Keys.ALT.toString() + "x").perform(); wizard.closeWithIcon(); } catch (org.openqa.selenium.TimeoutException e) { actionsFactory.createAction(ide.driver()).sendKeys(Keys.ALT.toString() + "x").perform(); wizard.closeWithIcon(); } waitForWebElements.until( ExpectedConditions.visibilityOf(ide.driver().findElement(By.xpath(locatorToEditorContaiPaineId)))) .click(); try { actionsFactory.createAction(ide.driver()).sendKeys(Keys.ALT.toString() + Keys.SHIFT.toString() + "A") .perform(); importProjectFromLocation.closeWithIcon(); } catch (org.openqa.selenium.TimeoutException e) { actionsFactory.createAction(ide.driver()).sendKeys(Keys.ALT.toString() + Keys.SHIFT.toString() + "A") .perform(); importProjectFromLocation.closeWithIcon(); } }
From source file:org.eclipse.che.selenium.pageobject.AskDialog.java
License:Open Source License
/** * wait opening the confirmation form with timeout defined by user * * @param timeOut user timeout/*from www.j ava 2 s . c om*/ */ public void waitFormToOpen(int timeOut) { new WebDriverWait(seleniumWebDriver, timeOut).until(ExpectedConditions.visibilityOf(form)); }
From source file:org.eclipse.che.selenium.pageobject.ConfigureClasspath.java
License:Open Source License
/** click on the library container */ public void clickLibraryContainer(String container) { WebElement element = seleniumWebDriver .findElement(By.xpath(String.format("//div[text()='%s']", container))); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(element)).click(); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.CreateWorkspace.java
License:Open Source License
public void typeWorkspaceName(String name) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(workspaceNameInput)); workspaceNameInput.clear();/*from w ww .j av a2 s . c o m*/ workspaceNameInput.sendKeys(name); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.CreateWorkspace.java
License:Open Source License
public void clickAllStacksTab() { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(selectAllStacksTab)).click(); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.CreateWorkspace.java
License:Open Source License
public void clickQuickStartTab() { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(selectQuickStartStacksTab)).click(); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.CreateWorkspace.java
License:Open Source License
public void clickSingleMachineTab() { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(selectSingleMachineStacksTab)).click(); }