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

private static void waitForRecoverPasswordButton(WebDriverWait wait) throws IOException {
    wait.until(ExpectedConditions//ww  w  .  j a  v  a2 s  . com
            .visibilityOfElementLocated(By.id(applangoButtons.RECOVER_PASSWORD_BUTTON.getValue().toString())));
    wait.until(ExpectedConditions.visibilityOfElementLocated(
            By.id(applangoTextfields.FORGOT_PASSWORD_USERNAME.getValue().toString())));
}

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

public static void enterUsernameInForgotPasswordTextfield(WebDriver driver1, String username)
        throws IOException {
    driver1.findElement(By.id(applangoTextfields.FORGOT_PASSWORD_USERNAME.getValue().toString()))
            .sendKeys(username);// w ww. j  a v  a  2  s  .c  o m
}

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

public static void waitForFailureAuthenticatedMessage(WebDriver driver1, WebDriverWait wait1)
        throws IOException {
    wait1.until(ExpectedConditions.visibilityOfElementLocated(
            By.id(applangoObject.AUTHENTICATION_AUTHENTICATED_FAILURE.getValue().toString())));
    Assert.assertTrue(driver1/*from w  w  w.ja v a2s . com*/
            .findElement(By.id(applangoObject.AUTHENTICATION_AUTHENTICATED_FAILURE.getValue().toString()))
            .getText().contains(applangoMessages.AUTHENTICATION_FAILURE.getValue().toString()));

}

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

public static void checkEnterNewPasswordScreenLoaded(WebDriver driver2, WebDriverWait wait2)
        throws IOException {
    wait2.until(ExpectedConditions/*from  ww  w  . j a v  a  2s .c o  m*/
            .visibilityOfElementLocated(By.id(applangoTextfields.NEW_PASSWORD.getValue().toString())));
    Assert.assertTrue(driver2.findElement(By.id(applangoObject.CHANGE_PASSWORD_MESSAGE.getValue().toString()))
            .getText().contains(applangoMessages.RESET_PASSWORD_DEFAULT.getValue().toString()));
}

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 filterLicenseType(WebDriver driver1, WebDriverWait wait1,
        salesforceLicenses salesforceLicenseType) throws IOException {
    driver1.findElement(By.id(applangoDropdowns.FILTER.getValue().toString()))
            .sendKeys(salesforceLicenseType.getValue().toString());
    clickOnDateSearchButton(driver1, wait1);
}

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

public static void unselectRememberUsernameCheckbox(WebDriver driver1) throws IOException {
    if (driver1.findElement(By.id(applangoButtons.LOGIN_REMEMBER_USERNAME_CHECKBOX.getValue())).isSelected()) {
        //un-select checkbox
        driver1.findElement(By.id(applangoButtons.LOGIN_REMEMBER_USERNAME_CHECKBOX.getValue())).click();
    }/*from www .j a  v a2  s  .c o m*/
}

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

public static void selectRememberUsernameCheckbox(WebDriver driver1) throws IOException {
    if (!(driver1.findElement(By.id(applangoButtons.LOGIN_REMEMBER_USERNAME_CHECKBOX.getValue()))
            .isSelected())) {//w w w  .  jav  a  2s .  c om
        //Select checkbox
        driver1.findElement(By.id(applangoButtons.LOGIN_REMEMBER_USERNAME_CHECKBOX.getValue())).click();
    }
}

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

public static void clickOnUpdateAlert(WebDriver driver1, WebDriverWait wait1) throws IOException {
    logger.info("Click on Update Alert  ");
    driver1.findElement(By.id(applangoButtons.UPDATE_ALERT.getValue())).click();
    waitUntilWaitForServerDissappears(wait1);
}

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

public static boolean checkAlertTrigger(WebDriver driver1) throws IOException {
    logger.info("Check alert trigger");
    return driver1.findElement(By.id(applangoObject.ACTIVE_ALERT.getValue())).getAttribute("class")
            .contains("activealert");
}