Example usage for org.openqa.selenium By xpath

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

Introduction

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

Prototype

public static By xpath(String xpathExpression) 

Source Link

Usage

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

private static void waitForAuthenticationScreen(WebDriverWait wait1) throws IOException {
    wait1.until(ExpectedConditions/*from  w w w .  j  a  va2  s . c  o  m*/
            .visibilityOfElementLocated(By.xpath(applangoButtons.AUTHENTICATION_SUBMIT.getValue().toString())));
}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void verifyNoAuthenticationSet(WebDriver driver1) throws IOException {
    Assert.assertTrue(driver1/*  ww w. j  a va2s  . c om*/
            .findElement(By.id(applangoTextfields.APPLICATION_CLIENT_KEY.getValue().toString())).isDisplayed());
    Assert.assertTrue(
            driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_SECRET.getValue().toString()))
                    .isDisplayed());
    Assert.assertTrue(driver1.findElement(By.xpath(applangoButtons.AUTHENTICATION_SUBMIT.getValue().toString()))
            .isEnabled());
}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void clickOnAuthenticationSubmit(WebDriver driver1, WebDriverWait wait) throws IOException {
    logger.info("click On Authentication Submit Button");
    driver1.findElement(By.xpath("/html/body/span/span/div[2]/div/div/div/button")).click();
    //        driver1.findElement(By.xpath(applangoButtons.AUTHENTICATION_SUBMIT.getValue().toString())).click();
    waitForAuthenticateLink(wait);/*w  ww.j  a  v a 2  s.c o  m*/
}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void verifyPasswordSuccessfulyChangedMessageAppear(WebDriver driver2) throws IOException {
    Assert.assertTrue(driver2.findElement(By.id(applangoObject.RESET_PASSWORD_SUCCESSFULLY.getValue()))
            .getText().equals(applangoMessages.RESET_PASSWORD_SUCCESSFULLY.getValue()));
    driver2.findElement(By.xpath(applangoButtons.SUCCESSFUL_RESET_PASSWORD_BUTTON.getValue())).click();

}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void clickSaveBoxNoLogin(WebDriver driver1, WebDriverWait wait1) throws IOException {
    logger.info("Save Alert Threshold ");

    wait1.until(ExpectedConditions/*from  w  w w. j ava  2s .c  o m*/
            .visibilityOfAllElementsLocatedBy(By.xpath("//*[@id=\"alertsdiv\"]/div[2]/span[1]")));
    driver1.findElement(By.xpath("//*[@id=\"alertsdiv\"]/div[2]/span[1]")).click();
    genericApplangoWebsiteActions.waitUntilWaitForServerDissappears(wait1);
}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void clickOnUserInPeoplePageUserTabler(WebDriver driver1, WebDriverWait wait1)
        throws IOException {
    logger.info(/*from  w  ww  . jav  a2  s. co m*/
            "Clicking on: " + driver1.findElement(By.xpath("//*[@id=\"usertabler\"]/tbody/tr[1]")).getText());
    clickOnUserInPeoplePageUserTabler(driver1, wait1, "1");
}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void clickOnUserInPeoplePageUserTabler(WebDriver driver1, WebDriverWait wait1, String rowNumber)
        throws IOException {
    driver1.findElement(By.xpath("//*[@id=\"usertabler\"]/tbody/tr[1]")).click();
    waitUntilWaitForServerDissappears(wait1);
    waitForHistogramToLoad(wait1);/*  w w  w. j a  v  a 2s . c  o  m*/
}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void openPeoplePage(WebDriver driver1, WebDriverWait wait1) throws IOException {
    logger.info("Open people page");
    driver1.findElement(By.xpath(applangoObject.PEOPLE_PAGE_TAB.getValue())).click();
    wait1.until(ExpectedConditions/*from w w w  . j ava 2 s .  co  m*/
            .visibilityOfAllElementsLocatedBy(By.id(applangoButtons.PEOPLE_PAGE_SEARCH.getValue())));
}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void openReportPage(WebDriver driver1, WebDriverWait wait1) throws IOException {
    logger.info("Open Report page");
    driver1.findElement(By.xpath(applangoObject.REPORT_PAGE_TAB.getValue())).click();
    wait1.until(ExpectedConditions//from w w  w  .ja  v a 2 s.  c  o  m
            .visibilityOfAllElementsLocatedBy(By.id(applangoButtons.REPORT_PAGE_SEARCH.getValue())));
}

From source file:applango.common.services.Applango.genericApplangoWebsiteActions.java

public static void clickOnReportDownload(WebDriver driver1, WebDriverWait wait1) throws IOException {
    logger.info("click On Report Download CSV");
    driver1.findElement(By.id(applangoButtons.REPORT_PAGE_DOWNLOAD.getValue())).click();
    wait1.until(ExpectedConditions.visibilityOfAllElementsLocatedBy(By.xpath("//*[@id=\"buttons\"]/output/a")));
}