@Test()
  public void forgotPasswordWithValidInput() throws Exception {

    driver.get(baseURL);
    clickByLink(ll.FORGOT_PASSWORD_LINK_L);
    typeByXpath(ll.FORGOT_PASSWORD_EMAIL_L, lv.FTL_EMAIL_V);
    clickByXpath(ll.FORGOT_PASSWORD_CONTINUE_L);
    Thread.sleep(4000);
    String actMessage = driver.findElement(By.xpath(ll.FORGOT_PASSWORD_SUCCESS_L)).getText();
    String expMessage = lv.FORGOT_PASSWORD_SUCCESS_V;

    boolean exist = expMessage.equals(actMessage);
    if (!exist) {
      Log4j.APPLICATION_LOG.debug(
          "Exp Message is: " + lv.FORGOT_PASSWORD_SUCCESS_V + " Act Message: " + actMessage);
      xl.setCellDataFailColor("Login", "passFail", 9, "FAIL", Color.RED);
      xl.setCellData(
          "Login",
          "Verification",
          9,
          "Exp Message is: " + lv.FORGOT_PASSWORD_SUCCESS_V + " | " + "Act Message: " + actMessage);
      clickByXpath(ll.FORGOT_PASSWORD_X_LINK_L);
      Assert.assertTrue(exist);
    } else {
      Log4j.APPLICATION_LOG.debug(
          "Exp Message is: " + lv.FORGOT_PASSWORD_SUCCESS_V + " Act Message: " + actMessage);
      xl.setCellDataPassColor("Login", "passFail", 9, "PASS", Color.GREEN);
      xl.setCellData(
          "Login",
          "Verification",
          9,
          "Exp Message is: " + lv.FORGOT_PASSWORD_SUCCESS_V + " | " + "Act Message: " + actMessage);
      clickByXpath(ll.FORGOT_PASSWORD_X_LINK_L);
      Assert.assertTrue(exist); // To Fail the test class
    }
    // Close the NEW FRAME BY CLCICKING X-OUT LINK

  }
예제 #2
0
  /// returns true if runmode of the test is equal to Y
  public static boolean isTestCaseRunnable(Xls_Reader xls, String SheetName, String testCaseName) {
    boolean isExecutable = false;
    for (int i = 2; i <= xls.getRowCount(SheetName); i++) {

      if (xls.getCellData(SheetName, "testCaseName", i).equalsIgnoreCase(testCaseName)) {
        if (setSkipFlag) {
          xls.setCellData(SheetName, "Runmode", i, "N");
        } else if (xls.getCellData(SheetName, "Runmode", i).equalsIgnoreCase("Y")) {
          isExecutable = true;
        } else {
          isExecutable = false;
        }
      }
    }

    return isExecutable;
  }