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.dashboard.workspaces.WorkspaceInstallers.java
License:Open Source License
public void switchInstallerState(String installerName) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions .visibilityOfElementLocated(By.xpath(format(Locators.INSTALLER_STATE, installerName)))) .click();//from w w w . ja v a 2 s. c om }
From source file:org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceInstallers.java
License:Open Source License
public void switchInstallerState(String installerName, String installerVersion) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath( format(Locators.INSTALLER_VERSION_STATE, installerName, installerVersion, installerName)))) .click();/* www .java 2 s. com*/ }
From source file:org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceInstallers.java
License:Open Source License
public Boolean isInstallerStateTurnedOn(String installerName) { String state = new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions .visibilityOfElementLocated(By.xpath(format(Locators.INSTALLER_STATE, installerName)))) .getAttribute("aria-checked"); return Boolean.parseBoolean(state); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceInstallers.java
License:Open Source License
public Boolean isInstallerStateNotChangeable(String installerName) { String state = new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions .visibilityOfElementLocated(By.xpath(format(Locators.INSTALLER_STATE, installerName)))) .getAttribute("aria-disabled"); return Boolean.parseBoolean(state); }
From source file:org.eclipse.che.selenium.pageobject.dashboard.workspaces.WorkspaceInstallers.java
License:Open Source License
public String getInstallerDescription(String installerName) { return new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(ExpectedConditions .visibilityOfElementLocated(By.xpath(format(Locators.INSTALLER_DESCRIPTION, installerName)))) .getText();/*from w w w .j a va 2 s . c o 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 ww w .j av a 2 s . co 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.DebugPanel.java
License:Open Source License
/** * Select specified value in Variable panel * * @param variable/*from w ww . j a v a 2s. com*/ */ public void selectVarInVariablePanel(String variable) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(ExpectedConditions .visibilityOfElementLocated(By.xpath(String.format(Locators.VARIABLE_PANEL_SELECT_VAL, variable)))); seleniumWebDriver.findElement(By.xpath(String.format(Locators.VARIABLE_PANEL_SELECT_VAL, variable))) .click(); }
From source file:org.eclipse.che.selenium.pageobject.debug.DebugPanel.java
License:Open Source License
/** * Click on specific button on Debugger panel * * @param buttonIdLocator use interface DebuggerButtonsPanel for select buttonIdLocator *//* w ww .j av a 2 s .c o m*/ public void clickOnButton(String buttonIdLocator) { loader.waitOnClosed(); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.id(buttonIdLocator))); seleniumWebDriver.findElement(By.id(buttonIdLocator)).click(); loader.waitOnClosed(); }
From source file:org.eclipse.che.selenium.pageobject.debug.DebugPanel.java
License:Open Source License
/** * Type user expression to the IDE Enter an expression field * * @param expression user expression/* www . j a va 2 s . c om*/ */ public void typeEvaluateExpression(String expression) { String exprFieldLocator = "//div[text()='Enter an expression:']/parent::div/following-sibling::div/input"; new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(exprFieldLocator))).clear(); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(exprFieldLocator))) .sendKeys(expression); }
From source file:org.eclipse.che.selenium.pageobject.debug.DebugPanel.java
License:Open Source License
/** Click on evaluate exp. button */ public void clickEvaluateBtn() { String locator = "//button[text()='Evaluate']"; new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locator))).click(); }