List of usage examples for org.openqa.selenium.support.ui ExpectedConditions visibilityOfAllElementsLocatedBy
public static ExpectedCondition<List<WebElement>> visibilityOfAllElementsLocatedBy(final By locator)
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
public static void clickOnReportDownload(WebDriver driver1, WebDriverWait wait1) throws IOException { logger.info("click On Report Download CSV"); driver1.findElement(By.id(applangoButtons.REPORT_PAGE_DOWNLOAD.getValue())).click(); wait1.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath("//*[@id=\"buttons\"]/output/a"))); }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
private static void openApplicationPage(WebDriver driver, WebDriverWait wait) throws IOException { clickOnApplicationLink(driver);/*from w w w . j a v a 2s . c o m*/ genericApplangoWebsiteActions.waitUntilWaitForServerDissappears(wait); wait.until(ExpectedConditions .visibilityOfAllElementsLocatedBy(By.id(applangoButtons.APPLICATION_DROP_DOWN.getValue()))); }
From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java
private static void checkVisibilityOfHomePageTables(WebDriverWait wait1) throws IOException { logger.info("Check visibility of HOME_PAGE_BITS, groupAnalytics, licenseAnalytics, minimalUsers"); wait1.until(ExpectedConditions .visibilityOfAllElementsLocatedBy(By.id(applangoObject.HOME_PAGE_BITS.getValue()))); wait1.until(ExpectedConditions//from w w w .j a v a 2s.com .visibilityOfAllElementsLocatedBy(By.id(applangoObject.HOME_PAGE_groupAnalytics.getValue()))); wait1.until(ExpectedConditions .visibilityOfAllElementsLocatedBy(By.id(applangoObject.HOME_PAGE_licenseAnalytics.getValue()))); wait1.until(ExpectedConditions .visibilityOfAllElementsLocatedBy(By.id(applangoObject.HOME_PAGE_minimalUsers.getValue()))); }
From source file:com.hotwire.selenium.bex.BexAbstractPage.java
License:Open Source License
protected List<WebElement> findMany(String cssSelector, int timeInSeconds) { return new WebDriverWait(getWebDriver(), timeInSeconds) .until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.cssSelector(cssSelector))); }
From source file:com.hotwire.selenium.bex.BexAbstractPage.java
License:Open Source License
protected List<WebElement> findMany(By seleniumObject, int timeInSeconds) { return new WebDriverWait(getWebDriver(), timeInSeconds) .until(ExpectedConditions.visibilityOfAllElementsLocatedBy(seleniumObject)); }
From source file:com.hotwire.selenium.desktop.globalheader.UserActionsFragment.java
License:Open Source License
public UserActionsFragment(WebDriver webdriver) { super(webdriver, By.cssSelector(CSS_USER_ACTIONS)); /**/* w ww. j a v a 2 s . c o m*/ * Wait until the user menu is expanded */ new WebDriverWait(getWebDriver(), getTimeout()) .until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.cssSelector(CSS_ACTIONS))); }
From source file:com.hotwire.selenium.desktop.us.results.AirResultsPage.java
License:Open Source License
public void select(Integer resultNumberToSelect, String opaqueRetail) { if (opaqueRetail.equals("retail")) { By locator = By.cssSelector("a[id^=retailSolutionResults]"); new WebDriverWait(getWebDriver(), getTimeout()) .until(ExpectedConditions.visibilityOfAllElementsLocatedBy(locator)); List<WebElement> solutions = getWebDriver().findElements(locator); LOGGER.info("Retail results count is {}. Try to select {} item..", solutions.size(), resultNumberToSelect);/*from ww w .j ava 2s.c om*/ if (solutions.size() > 0 && resultNumberToSelect < solutions.size() + 1) { solutions.get(resultNumberToSelect - 1).click(); } else { throw new RuntimeException("Number of solution to select is out of range.."); } } else { getWebDriver().findElement(By.cssSelector("a[id='airOpaqueSolutionResults']")).click(); } }
From source file:com.hotwire.selenium.desktop.us.results.HotelResultsPage.java
License:Open Source License
public boolean opaqueResultsAreDisplayed() { try {//www. j a v a 2 s . c om new WebDriverWait(getWebDriver(), 1).until( ExpectedConditions.visibilityOfAllElementsLocatedBy(By.id(getOpaqueResultsDisplayedLocator()))); return true; } catch (TimeoutException e) { return false; } }
From source file:com.hotwire.selenium.desktop.us.search.MultiVerticalFareFinder.java
License:Open Source License
public AirSearchFragment chooseAir() { new WebDriverWait(getWebDriver(), WAIT_TIMEOUT) .until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.cssSelector(AIR_RADIO))); getWebDriver().findElement(By.cssSelector(AIR_RADIO)).click(); return new AirSearchFragment(getWebDriver()); }
From source file:com.hotwire.selenium.desktop.us.search.MultiVerticalFareFinder.java
License:Open Source License
public CarSearchFragment chooseCar() { new WebDriverWait(getWebDriver(), WAIT_TIMEOUT) .until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.cssSelector(CAR_RADIO))); getWebDriver().findElement(By.cssSelector(CAR_RADIO)).click(); return new CarSearchFragment(getWebDriver()); }