List of usage examples for org.openqa.selenium By xpath
public static By xpath(String xpathExpression)
From source file:com.cengage.mindtap.keywords.BasePageActions.java
void switchToFullBookFrame() { switchToFrame( driver.findElement(By.xpath("//iframe[contains(@data-app-name,'Reader')]")).getAttribute("id")); }
From source file:com.cengage.mindtap.keywords.BasePageActions.java
void switchToApliaFrame() { switchToFrame( driver.findElement(By.xpath("//iframe[contains(@data-app-name,'Aplia')]")).getAttribute("id")); }
From source file:com.cengage.mindtap.keywords.BasePageActions.java
void switchToCNowHWFrame() { switchToFrame(driver.findElement(By.xpath("//iframe[contains(@data-app-name,'CNOW.HW-preclass_ilrn_com')]")) .getAttribute("id")); }
From source file:com.cengage.mindtap.keywords.BasePageActions.java
void selectOrder() { int position = 1; element("ddl_orderButton").click(); driver.findElement(By.xpath("//ul[@id='order-menu']/li[1]")).click(); }
From source file:com.cengage.mindtap.keywords.BasePageActions.java
void closeAnnouncement() { deselectFrame();/*from w ww . jav a 2s. com*/ try { resetImplicitTimeout(3); driver.findElement( By.xpath("//div[contains(@class,'announcement')]/div/a[contains(@class,'nb_closeIcon')]")) .click(); resetImplicitTimeout(120); } catch (Exception e) { resetImplicitTimeout(120); } }
From source file:com.cengage.mindtap.keywords.BasePageActions.java
void switchToFlashCardFrame() { switchToFrame( driver.findElement(By.xpath("//iframe[contains(@data-app-name,'FlashCard')]")).getAttribute("id")); }
From source file:com.cengage.mindtap.keywords.BasePageActions.java
void switchToGradeBookFrame() { switchToFrame( driver.findElement(By.xpath("//iframe[contains(@data-app-name,'Progress')]")).getAttribute("id")); }
From source file:com.cengage.mindtap.keywords.DashBoardPageActions.java
public void LaunchAppFromAppDock(String appName) { waitForElementPresent("expandDockBtn"); try {/*from ww w . j a v a 2s . c o m*/ element("expandDockBtn").click(); } catch (Exception e) { ReportMsg.info("Dock items are already expanded or expand dock button is not present"); } try { element("app_name", appName).click(); } catch (Exception e) { driver.findElement(By.xpath("//img[@title='ConnectYard']")).click(); } element("appActionFrameTitle"); ReportMsg.info("User Clicked on '" + appName + " App from AppDock "); }
From source file:com.cengage.mindtap.keywords.DashBoardPageActions.java
void closeAnnouncement() { try {//from www.jav a 2s .c om List<WebElement> closeLinks = driver.findElements(By.xpath("//a[contains(@class,'nb_closeIcon')]")); for (WebElement link : closeLinks) { link.click(); } } catch (Exception e) { } }
From source file:com.cengage.mindtap.keywords.DashBoardPageActions.java
private void DashboardCourseSetting() { element("Dashboard_collapse").click(); Select dropdown = new Select(driver.findElement(By.xpath("//select"))); dropdown.selectByVisibleText("Unit View"); dropdown.selectByVisibleText("List View"); dropdown.selectByVisibleText("Week View"); Assert.assertTrue(element("SaveSetting_Dashboard").isDisplayed(), "save setting button is not present"); element("Dashboard_collapse").click(); ReportMsg.log("Dashbord_collapse verified"); }