List of usage examples for org.openqa.selenium.support.ui ExpectedConditions visibilityOf
public static ExpectedCondition<WebElement> visibilityOf(final WebElement element)
From source file:org.eclipse.che.selenium.pageobject.dashboard.organization.OrganizationPage.java
License:Open Source License
public void setWorkspaceCap(int capSize) { String size = String.valueOf(capSize); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(workspaceCap)).clear(); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(workspaceCap)).sendKeys(String.valueOf(size)); redrawUiElementsTimeout.until((WebDriver driver) -> driver.findElement(By.xpath(Locators.WORKSPACE_CAP)) .getAttribute("value").equals(size)); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.organization.OrganizationPage.java
License:Open Source License
public void setRunningWorkspaceCap(int capSize) { String size = String.valueOf(capSize); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(runningWorkspaceCap)).clear(); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(runningWorkspaceCap)) .sendKeys(String.valueOf(size)); redrawUiElementsTimeout.until((WebDriver driver) -> driver .findElement(By.xpath(Locators.RUNNING_WORKSPACE_CAP)).getAttribute("value").equals(size)); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.organization.OrganizationPage.java
License:Open Source License
public void setWorkspaceRamCap(int capSize) { String size = String.valueOf(capSize); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(workspaceRamCap)).clear(); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(workspaceRamCap)) .sendKeys(String.valueOf(size)); redrawUiElementsTimeout.until((WebDriver driver) -> driver.findElement(By.xpath(Locators.DELETE_ORG_BUTTON)) .getAttribute("value").equals(size)); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.organization.OrganizationPage.java
License:Open Source License
public void deleteMember(String email) { String s = String.format(Locators.MEMBERS_LIST_ITEM_XPATH, email); s = s + "/ancestor::div[3]" + Locators.MEMBER_CHECKBOX; WaitUtils.sleepQuietly(1);//from w ww . ja v a 2 s . c o m redrawUiElementsTimeout.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(s))).click(); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(deleteMemberButton)).click(); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(widgetDeleteMemberButton)).click(); redrawUiElementsTimeout.until(ExpectedConditions .invisibilityOfElementLocated(By.xpath(String.format(Locators.MEMBERS_LIST_ITEM_XPATH, email)))); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.organization.OrganizationPage.java
License:Open Source License
public void searchMembers(String name) { redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(membersSearchField)).clear(); redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(membersSearchField)).sendKeys(name); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.organization.OrganizationPage.java
License:Open Source License
public void clearSearchField() { redrawUiElementsTimeout.until(ExpectedConditions.visibilityOf(membersSearchField)).clear(); }
From source file:org.eclipse.che.selenium.pageobject.debug.AbstractDebugConfig.java
License:Open Source License
/** Wait opening of the Debug configuration widget */ public void waitDebugConfigurationIsOpened() { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(debugConfigurationsView)); }/*from ww w . ja v a2s . co m*/
From source file:org.eclipse.che.selenium.pageobject.debug.AbstractDebugConfig.java
License:Open Source License
/** * Remove debug config with certain name and then close Debug Configuration form. *//from w w w . j a va 2 s . c o m * @param configName name of configuration to remove. */ public void removeConfig(String configName) { String configItemXpath = String.format(Locators.CONFIG_ITEM_XPATH_TEMPLATE, configName); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(configItemXpath))).click(); String removeConfigButtonXpath = String.format(Locators.REMOVE_CONFIG_BUTTON_XPATH_TEMPLATE, configName); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(removeConfigButtonXpath))).click(); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(deleteConfigurationDialogTitle)); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.id(AskDialog.OK_BTN_ID))).click(); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.invisibilityOfElementLocated(By.id(AskDialog.OK_BTN_ID))); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.invisibilityOfElementLocated(By.xpath(configItemXpath))); close(); }
From source file:org.eclipse.che.selenium.pageobject.debug.AbstractDebugConfig.java
License:Open Source License
/** * Create debug configuration with default parameters and certain name. */*w w w. j av a 2s. c o m*/ * @param configName name of configuration */ void createConfigWithoutClosingDialog(String configName) { waitDebugConfigurationIsOpened(); expandDebugCategory(); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(nameFieldOfDebugConf)); nameFieldOfDebugConf.clear(); nameFieldOfDebugConf.sendKeys(configName); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(configSaveBtn)).click(); }
From source file:org.eclipse.che.selenium.pageobject.debug.CppDebugConfig.java
License:Open Source License
/** Create debug configuration and close dialog. */ public void createConfig(String configName, int debugPort) { createConfigWithoutClosingDialog(configName); // set debug port new WebDriverWait(seleniumWebDriver, ATTACHING_ELEM_TO_DOM_SEC) .until(ExpectedConditions.visibilityOf(debugPortInput)); debugPortInput.clear();//from ww w . j a v a 2s .c o m debugPortInput.sendKeys(String.valueOf(debugPort)); new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOf(configSaveBtn)).click(); close(); }