List of usage examples for org.openqa.selenium By tagName
public static By tagName(String tagName)
From source file:com.hotwire.selenium.desktop.us.search.AirSearchFragment.java
License:Open Source License
public ArrayList<String> getAttibutesForAutocomplete(String attributeName) { List<WebElement> autocompleteList = getAutoComplete().findElements(By.tagName("li")); ArrayList<String> autocompleteAttributes = new ArrayList<>(); for (WebElement item : autocompleteList) { autocompleteAttributes.add(item.getAttribute(attributeName)); }/*from www. j ava 2 s .com*/ return autocompleteAttributes; }
From source file:com.hotwire.selenium.desktop.us.search.AirSearchFragment.java
License:Open Source License
public ArrayList<String> getAutoCompleteContents() { List<WebElement> autocompleteList = getAutoComplete().findElements(By.tagName("div")); ArrayList<String> autocompleteTextContents = new ArrayList<>(); for (WebElement item : autocompleteList) { autocompleteTextContents.add(item.getText()); }//from w w w . j a va 2s . c o m return autocompleteTextContents; }
From source file:com.hotwire.selenium.desktop.us.search.AirSearchFragment.java
License:Open Source License
public List<WebElement> getAutocompleteElements() { return getAutoComplete().findElements(By.tagName("div")); }
From source file:com.hotwire.selenium.desktop.us.search.CarSearchFragment.java
License:Open Source License
public ArrayList<String> getAttibutesForAutocomplete(String attributeName) { List<WebElement> autocompleteList = fareFinderForm .findElement(By.cssSelector(FARE_FINDER_AUTOCOMPLETE_CONTENT)).findElements(By.tagName("li")); ArrayList<String> autocompleteAttributes = new ArrayList<String>(); for (WebElement item : autocompleteList) { autocompleteAttributes.add(item.getAttribute(attributeName)); }/*from w ww. java 2 s . c o m*/ return autocompleteAttributes; }
From source file:com.hotwire.selenium.desktop.us.search.CarSearchFragment.java
License:Open Source License
public ArrayList<String> getAutocomleteContents() { List<WebElement> autocompleteList = fareFinderForm .findElement(By.cssSelector(FARE_FINDER_AUTOCOMPLETE_CONTENT)).findElements(By.tagName("div")); ArrayList<String> autocompleteTextContents = new ArrayList<String>(); for (WebElement item : autocompleteList) { autocompleteTextContents.add(item.getText()); }/*from ww w. j a v a2 s. c o m*/ return autocompleteTextContents; }
From source file:com.hotwire.selenium.desktop.us.search.CarSearchFragment.java
License:Open Source License
public List<WebElement> getAutocompleteElements() { List<WebElement> autocompleteElements = fareFinderForm .findElement(By.cssSelector(FARE_FINDER_AUTOCOMPLETE_CONTENT)).findElements(By.tagName("div")); return autocompleteElements; }
From source file:com.hotwire.selenium.desktop.us.search.HotelSearchFragment.java
License:Open Source License
public ArrayList<String> getAttibutesForAutocomplete(String attributeName) { List<WebElement> autocompleteList = fareFinderForm .findElement(cssSelector(FARE_FINDER_AUTOCOMPLETE_CONTENT)).findElements(By.tagName("li")); ArrayList<String> autocompleteAttributes = new ArrayList<>(); for (WebElement item : autocompleteList) { autocompleteAttributes.add(item.getAttribute(attributeName)); }/*from w w w . j a v a 2s . co m*/ return autocompleteAttributes; }
From source file:com.hotwire.selenium.desktop.us.search.HotelSearchFragment.java
License:Open Source License
public ArrayList<String> getAutocompleteContents() { List<WebElement> autocompleteList = fareFinderForm .findElement(cssSelector(FARE_FINDER_AUTOCOMPLETE_CONTENT)).findElements(By.tagName("div")); ArrayList<String> autocompleteTextContents = new ArrayList<>(); for (WebElement item : autocompleteList) { if ((item.getAttribute("title") != null) && !(item.getAttribute("title").equals(""))) { autocompleteTextContents.add(item.getAttribute("title").trim()); } else {/*from w w w . jav a2 s. co m*/ autocompleteTextContents.add(item.getText().trim()); } } return autocompleteTextContents; }
From source file:com.hotwire.selenium.desktop.us.search.HotelSearchFragment.java
License:Open Source License
public List<WebElement> getAutocompleteElements() { return fareFinderForm.findElement(cssSelector(FARE_FINDER_AUTOCOMPLETE_CONTENT)) .findElements(By.tagName("div")); }
From source file:com.hotwire.selenium.mobile.results.MobileHotelResultsPage.java
License:Open Source License
/** * If there is more than one hood, filter by the first one *//*from w w w . j a v a2 s .co m*/ public void filteredByHoodName(String hoodName) { filterButton.click(); List<WebElement> hoodsNames = getWebDriver().findElements(By.xpath(".//*[@class='hood-names']//li")); int i = 0; for (i = 0; i < hoodsNames.size(); i++) { if (hoodsNames.get(i).getText().equals(hoodName)) { break; } } hoodsNames.get(i).findElement(By.tagName("input")).click(); filterDoneButton.click(); }