Example #1
0
  @Test(sequential = true)
  public void testAbstract() throws Exception {

    cleaning.cleaner(EnvInitialization.BROWSER_IE);
    String[] data = new String[4];
    DataLibrary lib = new DataLibrary();
    String filePath = (EnvInitialization.DATA_SANITY);
    data = lib.getExcelData(filePath, EnvInitialization.DATA_SHEET_BIOGRAPHY, 2);
    try {
      String currentScriptName = this.getClass().getSimpleName();
      SanityFunctionRepository sfr = new SanityFunctionRepository(currentScriptName);
      login.loginuser(data[0], data[1]);
      System.out.println("Sanity Data arry length is-------" + data.length);
      for (int i = 4; i < data.length; i++) {
        boolean flag = sfr.abstractKOL(data[0], data[1], data[2], data[3], data[i]);
        if (!flag) throw new Exception();
      }
      configuration.selenium.deselectPopUp();
      Thread.sleep(2000);
      configuration.selenium.close();
      GenericFuntions.writeSummaryPass("Abstract");

    } catch (Exception ex) {
      cleaning.Errorwriter(ex);
    }
  }
Example #2
0
  public static void loginuser(String userName, String passWord) {
    try {
      gf.typeIntoTextBox("userName", userName);

      gf.typeIntoTextBox("userPassword", passWord);
      configuration.selenium.click("Submit2");
      Thread.sleep(2000);

      popuswindows.allpageloads();

    } catch (Exception e) {
      try {
        gf.writeFail("Verifying login" + userName, "Faied and exception occured");
      } catch (Exception e1) {
        e.printStackTrace();
      }
    }
  }