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.intelligent.CommandsExplorer.java
License:Open Source License
public void clickAddCommandButton(String goalName) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC).until(ExpectedConditions .visibilityOfElementLocated(By.xpath(String.format(Locators.ADD_COMMAND_BUTTON_LOCATOR, goalName)))) .click();// www . j ava2s. c o m }
From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsExplorer.java
License:Open Source License
public void chooseCommandTypeInContextMenu(String type) { new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated( By.xpath("//div[@class='popupContent']/select[contains(@class,'gwt-ListBox')]"))); WebElement commandTypeElement = new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementToBeClickable(getCommandTypeElementInContextMenu(type))); commandTypeElement.click();//from w w w . j a v a2s .c om new WebDriverWait(seleniumWebDriver, REDRAW_UI_ELEMENTS_TIMEOUT_SEC) .until(ExpectedConditions.elementToBeSelected(commandTypeElement)); // add timeout to be sure webelement ready to dbClick in some test got exception here WaitUtils.sleepQuietly(200, TimeUnit.MILLISECONDS); new Actions(seleniumWebDriver).doubleClick(commandTypeElement).perform(); }
From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsExplorer.java
License:Open Source License
/** * wait until command will be selected/*from www. jav a2 s . c o m*/ * * @param commandName visible name of command in the command explorer */ public void waitCommandIsSelected(String commandName) { String locator = String.format("//div[@id='command_%s' and contains(normalize-space(@class), 'selected')]", commandName); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath(locator))); }
From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsExplorer.java
License:Open Source License
public void waitCommandInExplorerByName(String commandName) { new WebDriverWait(seleniumWebDriver, ELEMENT_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated( By.xpath("//div[@id='gwt-debug-navPanel']//div[text()='" + commandName + "']"))); }
From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsExplorer.java
License:Open Source License
public void cloneCommandByName(String commandName) { selectCommandByName(commandName);// ww w.java2 s . c om loader.waitOnClosed(); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath( "//div[@id='command_" + commandName + "']//span[@id='commands_tree-button-duplicate']/*"))) .click(); }
From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsExplorer.java
License:Open Source License
public void clickOnRemoveButtonInExplorerByName(String commandName) { selectCommandByName(commandName);//from ww w. ja v a2 s. co m new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC).until( ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[@id='command_" + commandName + "']"))) .click(); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath( "//div[@id='command_" + commandName + "']//span[@id='commands_tree-button-remove']"))) .click(); }
From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsExplorer.java
License:Open Source License
public void deleteCommandByName(String commandName) { selectCommandByName(commandName);/* w w w. ja v a 2 s . c o m*/ loader.waitOnClosed(); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC).until( ExpectedConditions.visibilityOfElementLocated(By.xpath("//div[@id='command_" + commandName + "']"))) .click(); new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath( "//div[@id='command_" + commandName + "']//span[@id='commands_tree-button-remove']"))) .click(); askDialog.waitFormToOpen(); askDialog.confirmAndWaitClosed(); }
From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsExplorer.java
License:Open Source License
public void checkCommandIsPresentInGoal(String goalName, String commandName) { new WebDriverWait(seleniumWebDriver, LOAD_PAGE_TIMEOUT_SEC) .until(ExpectedConditions.visibilityOfElementLocated(By.xpath( "//div[@id='goal_" + goalName + "']/parent::div//div[@id='command_" + commandName + "']"))); }
From source file:org.eclipse.che.selenium.pageobject.intelligent.CommandsPalette.java
License:Open Source License
public void commandIsExists(String commandName) { redrawUiElementTimeout.until( ExpectedConditions.visibilityOfElementLocated(By.xpath(format(Locators.COMMANDS, commandName)))); }