Example usage for org.openqa.selenium By className

List of usage examples for org.openqa.selenium By className

Introduction

In this page you can find the example usage for org.openqa.selenium By className.

Prototype

public static By className(String className) 

Source Link

Document

Find elements based on the value of the "class" attribute.

Usage

From source file:com.hotwire.selenium.desktop.us.helpcenter.HelpCenterPage.java

License:Open Source License

public String getLocationSupporInfo() {
    return getWebDriver().findElement(By.className("locationSupportInfo")).getText();
}

From source file:com.hotwire.selenium.desktop.us.HomePage.java

License:Open Source License

public PartnerIMLFragment getPartnerIMLFragment() {
    return new PartnerIMLFragment(getWebDriver(), By.className("IM_lightbox_container"));
}

From source file:com.hotwire.selenium.desktop.us.partners.PartnerIMLFragment.java

License:Open Source License

public PartnerIMLFragment(WebDriver webDriver) {
    super(webDriver, By.className("IM_lightbox_container"), 20);
}

From source file:com.hotwire.selenium.desktop.us.results.car.fragments.CarSolutionFragment.java

License:Open Source License

private void setCarTypeCode() {
    carTypeCode = carSolutionWebElement.findElement(By.className("continueBtn")).getAttribute("id")
            .replaceAll("carType", ""); //id attribute looks like this - id="carTypeCCAR".
}

From source file:com.hotwire.selenium.desktop.us.results.car.fragments.depositFilter.CarDepositFilter.java

License:Open Source License

public CarDepositFilter(WebDriver webDriver) {
    super(webDriver, By.className("depositTypeFilter"));
}

From source file:com.hotwire.selenium.desktop.us.results.hotel.fragments.filters.HotelResultsAmenitiesFilteringTabPanelFragment.java

License:Open Source License

public HotelResultsAmenitiesFilteringTabPanelFragment(WebDriver webDriver) {
    super(webDriver, By.className(FRAGMENT_CONTAINER));
}

From source file:com.hotwire.selenium.desktop.us.results.hotel.fragments.filters.HotelResultsAreasFilteringTabPanelFragment.java

License:Open Source License

public HotelResultsAreasFilteringTabPanelFragment(WebDriver webDriver) {
    super(webDriver, By.className(FRAGMENT_CONTAINER));
}

From source file:com.hotwire.selenium.desktop.us.results.hotel.fragments.filters.HotelResultsPriceFilteringTabPanelFragement.java

License:Open Source License

public HotelResultsPriceFilteringTabPanelFragement(WebDriver webDriver) {
    super(webDriver, By.className(FRAGMENT_CONTAINER));
}

From source file:com.hotwire.selenium.desktop.us.results.hotel.fragments.filters.HotelResultsStarRatingFilteringTabPanelFragment.java

License:Open Source License

public HotelResultsStarRatingFilteringTabPanelFragment(WebDriver webDriver) {
    super(webDriver, By.className(FRAGMENT_CONTAINER));
}

From source file:com.hotwire.selenium.desktop.us.results.HotelResultsSearchResultsFragment.java

License:Open Source License

public void selectOpaqueResultWithRoomType(String roomType) {
    new HotelResultsPage(getWebDriver()).chooseOpaque();
    if (resultBodies.size() == 0) {
        throw new ZeroResultsTestException("0 results returned from search.");
    }/*  w  ww.  j a v a2  s.  co  m*/
    int i = 0;
    for (WebElement result : resultBodies) {
        WebElement hrefElement = result.findElement(By.className("neighborhoodName"));
        String resultName = hrefElement.getText();
        if (resultName.contains(roomType)) {
            result.findElement(By.className("hotelNameLink")).click();
            break;
        }
        i++;
    }
}