List of usage examples for org.openqa.selenium.support.ui ExpectedConditions presenceOfElementLocated
public static ExpectedCondition<WebElement> presenceOfElementLocated(final By locator)
From source file:com.hotwire.selenium.desktop.details.HotelDetailsPage.java
License:Open Source License
public boolean isLPGLayerPresent() { lpgLink.click();/*from w w w . j a va 2s .c om*/ return new WebDriverWait(getWebDriver(), 3) .until(ExpectedConditions.presenceOfElementLocated(By.className(TOOLTIP_LAYER_CLASS))).isDisplayed() ? true : false; }
From source file:com.hotwire.selenium.desktop.details.HotelDetailsPage.java
License:Open Source License
public boolean isTripAdvisorLayerPresent() { lnkOpenWhatTripAdvisor.click();//from www. ja va2 s.c o m return new WebDriverWait(getWebDriver(), 3) .until(ExpectedConditions.presenceOfElementLocated(By.id(TRIP_ADVISOR_LAYER_ID))).isDisplayed() ? true : false; }
From source file:com.hotwire.selenium.desktop.details.HotelDetailsPage.java
License:Open Source License
public boolean isCancellationPolicyPanelPresent() { lnkOpenCancellationPolicy.click();// w w w . ja va 2 s. c om return new WebDriverWait(getWebDriver(), 3) .until(ExpectedConditions .presenceOfElementLocated(By.className(CANCELLATION_POLICY_PANEL_CLOSE_LINK_CLASS))) .isDisplayed() ? true : false; }
From source file:com.hotwire.selenium.desktop.details.HotelDetailsPage.java
License:Open Source License
public boolean isFeaturesListPresent() { return new WebDriverWait(getWebDriver(), 3) .until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(FEATURES_LIST_CSS))).getText() .length() > 25 ? true : false; }
From source file:com.hotwire.selenium.desktop.details.HotelDetailsPage.java
License:Open Source License
public boolean isLocationDescTextPresent() { lnkOpenCancellationPolicy.click();/*from ww w. j ava 2s . com*/ return new WebDriverWait(getWebDriver(), 3) .until(ExpectedConditions.presenceOfElementLocated(By.xpath(LOCATION_DESC_XPATH))).getText() .length() > 25 ? true : false; }
From source file:com.hotwire.selenium.desktop.helpCenter.HCContactUsForm.java
License:Open Source License
public WebElement getFormElementByName(String name) { return new WebDriverWait(getWebDriver(), 1) .until(ExpectedConditions.presenceOfElementLocated(By.name(name))); }
From source file:com.hotwire.selenium.desktop.helpCenter.HCContactUsForm.java
License:Open Source License
public String getFormElementValueByName(String name) { return new WebDriverWait(getWebDriver(), 1) .until(ExpectedConditions.presenceOfElementLocated(By.name(name))).getAttribute("value"); }
From source file:com.hotwire.selenium.desktop.helpCenter.HCContactUsForm.java
License:Open Source License
public boolean isHighlightedFormElement(String name) { String cssClass = new WebDriverWait(getWebDriver(), 1) .until(ExpectedConditions.presenceOfElementLocated(By.xpath("//*[@name='" + name + "']//.."))) .getAttribute("class"); if (cssClass.equals("formRow")) { return false; }//from w w w . j a va 2s . c o m return true; }
From source file:com.hotwire.selenium.desktop.helpCenter.HCSubcategoryPage.java
License:Open Source License
public void clickOnAnyArticle() { new WebDriverWait(getWebDriver(), 1).until( ExpectedConditions.presenceOfElementLocated(By.xpath(".//*[@id='tileName-A2']/div/ol/li[1]/a"))) .click();// w ww . j av a 2 s. c o m }
From source file:com.hotwire.selenium.desktop.us.billing.car.impl.accordion.AcDetailsFragment.java
License:Open Source License
@Override public String[] getSelectedVendorGridEntity() { return getVendorAsArray(new WebDriverWait(getWebDriver(), 5) .until(ExpectedConditions.presenceOfElementLocated(By.cssSelector("#rentalAgencyGrid .selected")))); }