Example usage for org.openqa.selenium By id

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

Introduction

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

Prototype

public static By id(String id) 

Source Link

Usage

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

public static void enterAuthentication(WebDriver driver1, String accessToken, String clientSecret)
        throws IOException {
    driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_KEY.getValue().toString())).clear();
    driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_KEY.getValue().toString()))
            .sendKeys(accessToken);/*  www .  j  a  v a  2  s . com*/
    driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_SECRET.getValue().toString())).clear();
    driver1.findElement(By.id(applangoTextfields.APPLICATION_CLIENT_SECRET.getValue().toString()))
            .sendKeys(clientSecret);
}

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

public static void clickOnAuthenticationLink(WebDriver driver1, WebDriverWait wait) throws IOException {
    logger.info("click On Authentication link ");
    driver1.findElement(By.id(applangoObject.AUTHENTICATION_CLICK_HERE_LINK.getValue().toString())).click();
    waitForAuthenticateVerify(wait);//from   w  w w. j  a  va 2  s .  c o  m
}

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

private static void waitForAuthenticateVerify(WebDriverWait wait) throws IOException {
    logger.info("wait for verify button");
    wait.until(ExpectedConditions/* ww w.j  a  va  2  s .c  o m*/
            .visibilityOfElementLocated(By.id(applangoButtons.AUTHENTICATION_VERIFY.getValue().toString())));
}

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

private static void waitForAuthenticateLink(WebDriverWait wait) throws IOException {
    wait.until(ExpectedConditions.visibilityOfElementLocated(
            By.id(applangoObject.AUTHENTICATION_CLICK_HERE_LINK.getValue().toString())));
}

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

public static void waitForSuccessfulAuthenticatedMessage(WebDriver driver1, WebDriverWait wait1)
        throws IOException {
    wait1.until(ExpectedConditions.visibilityOfElementLocated(
            By.id(applangoObject.AUTHENTICATION_AUTHENTICATED_SUCCESS.getValue().toString())));
    Assert.assertTrue(driver1/*from w w  w . j  a va  2 s.co m*/
            .findElement(By.id(applangoObject.AUTHENTICATION_AUTHENTICATED_SUCCESS.getValue().toString()))
            .getText().contains(applangoMessages.AUTHENTICATION_SUCCESSFUL.getValue().toString()));
}

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

public static void clickOnVerifyAuthentication(WebDriver driver1) throws IOException {
    driver1.findElement(By.id(applangoButtons.AUTHENTICATION_VERIFY.getValue().toString())).click();
}

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

public static void waitForSuccessfulAccountAuthenticatedMessage(WebDriverWait wait1) throws IOException {

    logger.info("Wait for message: "
            + applangoMessages.AUTHENTICATION_SUCCESSFUL_IN_APPLICATION.getValue().toString());
    wait1.until(ExpectedConditions.visibilityOfElementLocated(By
            .id(applangoObject.AUTHENTICATION_AUTHENTICATED_SUCCESSFULLY_IN_DASHBOARD.getValue().toString())));
}

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

public static void clickOnRecoverPassword(WebDriver driver1, WebDriverWait wait) throws IOException {
    driver1.findElement(By.id(applangoButtons.RECOVER_PASSWORD_BUTTON.getValue().toString())).click();
    waitForRecoverPasswordRequestSent(wait);
}

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

private static void waitForRecoverPasswordRequestSent(WebDriverWait wait) throws IOException {
    wait.until(ExpectedConditions.visibilityOfElementLocated(
            By.id(applangoObject.RECOVER_PASSWORD_REQUEST_SENT.getValue().toString()))).getText()
            .contains(applangoMessages.RECOVER_PASSWORD_REQUEST_SENT.getValue().toString());
}

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

public static void clickOnForgotPassword(WebDriver driver1, WebDriverWait wait) throws IOException {
    driver1.findElement(By.id(applangoButtons.FORGOT_PASSWORD_BUTTON.getValue().toString())).click();
    waitForRecoverPasswordButton(wait);/*from w w w .ja v a2s .  c  o  m*/
}