List of usage examples for org.openqa.selenium By className
public static By className(String className)
From source file:com.comcast.dawg.house.EditDeviceRow.java
License:Apache License
/** * Checks if the modified icon is highlihgted * @return/* ww w .j a v a 2 s . co m*/ */ public boolean isModified() { String classVal = rowUI.findElement(By.className(MODIFIED_ICON)).getAttribute("class"); Collection<String> classes = Arrays.asList(classVal.split(" ")); return classes.contains(MODIFIED_ICON_CLASS); }
From source file:com.comcast.dawg.house.EditDeviceRow.java
License:Apache License
/** * Toggles the state of the modified icon */ public void toggleModified() { rowUI.findElement(By.className(MODIFIED_ICON)).click(); }
From source file:com.comcast.dawg.house.EditDeviceRow.java
License:Apache License
/** * Clicks the delete button and then confirms the alert *///from w w w. ja va2s .c o m public void delete() { rowUI.findElement(By.className(BTN_DEL_PROP)).click(); Alert alert = driver.switchTo().alert(); alert.accept(); }
From source file:com.comcast.dawg.house.EditDeviceUIIT.java
License:Apache License
private void waitForNewPageToLoad(RemoteWebDriver driver, WebElement oldPageElement) { WebDriverWait wait = new WebDriverWait(driver, 20); wait.until(ExpectedConditions.stalenessOf(oldPageElement)); wait.until(ExpectedConditions.presenceOfElementLocated(By.className(IndexPage.FILTERED_TABLE))); }
From source file:com.comcast.dawg.house.pages.IndexPage.java
License:Apache License
/** * Load the DAWG house index page.//from w ww.j a v a2s . c o m */ public void load() { driver.get(TestServers.getHouse() + userName + "/"); seleniumWaiter.waitForPresence(By.className(IndexPage.FILTERED_TABLE), INDEX_PAGE_LOAD_TIMEOUT); // Wait to ensure the index page load completely. SeleniumWaiter.waitTill(INDEX_PAGE_LOAD_COMPLETION_WAIT); }
From source file:com.comcast.dawg.house.pages.IndexPage.java
License:Apache License
/** * Return the tag delete div element.//w ww. ja v a 2 s. co m * * @param tagName Name of the tag element. * * @return delete div element of the tag. */ public WebElement getTagDeleteDivElement(String tagName) { WebElement tagDivElement = getTagCloudTagDivElement(tagName); return tagDivElement.findElement(By.className(TAG_DELETE_DIV_ELEMENT_IDENTIFIER)); }
From source file:com.comcast.dawg.house.pages.IndexPage.java
License:Apache License
/** * Return the tag cloud text corresponding to tag name passed. * * @param tagName tag name./*from w ww. j ava 2 s . co m*/ * * @return tag element text. */ public String getTagCloudTagText(String tagName) { WebElement tagCloudDivElement = getTagCloudTagDivElement(tagName); return tagCloudDivElement.findElement(By.className(TAG_CLOUD_TAG_TEXT_ELEMENT_IDENTIFIER)).getText(); }
From source file:com.comcast.dawg.house.pages.IndexPage.java
License:Apache License
/** * Provides the set-top meta data span text content. * * @param stbId tag name to be clicked. * @param spanCssClassName Class name of span element. * * @return Meta data span content./* w w w. j a va 2 s.c o m*/ */ public String getStbMetaDataSpanTextContent(String stbId, String spanCssClassName) { WebElement settopFilterRow = getStbFilterDivRowElement(stbId); LOGGER.info("Data Device ID : " + settopFilterRow.getAttribute("data-deviceId")); WebElement metaDataDivTag = settopFilterRow.findElement(By.className("metadata")); WebElement tagNameSpan = metaDataDivTag.findElement(By.cssSelector("span." + spanCssClassName)); return tagNameSpan.getAttribute("textContent"); }
From source file:com.comcast.dawg.house.pages.ModelPage.java
License:Apache License
/** * Provides the capabilities available for the stb model. * * @param modelName Model name.//from w ww . ja va2 s .c o m * * @return capabilities of the STB model. */ public String getCapabilitiesOfStbModel(String modelName) { WebElement modelCapabiliyElement = getStbModelTrElement(modelName) .findElement(By.className(MODEL_CAPABILITIES_TD_IDENTIFIER)); return modelCapabiliyElement.getText(); }
From source file:com.comcast.dawg.house.pages.ModelPage.java
License:Apache License
/** * Provides the family of stb model.//from w ww. ja v a 2 s. co m * * @param modelName Model name. * * @return family of the STB model. */ public String getFamilyOfStbModel(String modelName) { WebElement modelFamilyElement = getStbModelTrElement(modelName) .findElement(By.className(MODEL_FAMILY_TD_IDENTIFIER)); return modelFamilyElement.getText(); }