Пример #1
0
 public void tc1VerifyLoginProcedurePositiveTest()
 {
     try {
         test = extent.CreateTest("tc1VerifyLoginProcedurePositeTest").Info("tc1VerifyLoginProcedurePositeTest Started");
         LoginPageObject   loginObject = new LoginPageObject();
         UpdatePageObjects pageObj     = loginObject.Login(DataLib.ReadData(1, "Email"), DataLib.ReadData(1, "Password"));
         test.Log(Status.Info, "Successfully Logged In with DS Data");
         test.Log(Status.Pass, "tc1VerifyLoginProcedurePositeTest Passed");
     }
     catch (Exception e)
     {
         test.Log(Status.Fail, e.ToString());
         throw;
     }
 }
Пример #2
0
      public void tc2UpdateUserCredentialsUponLoginDDTPositiveTest()
      {
          DataLib2.PopulateInCollection2(@"C:\Users\User\Desktop\New folder\Interview\Interview.Test2\DataSources\Data2.xlsx");
          test = extent.CreateTest("tc2UpdateUserCredentialsUponLoginDDTPositiveTest").Info("tc2UpdateUserCredentialsUponLoginDDTPositiveTest Started");
          try
          {   //Testing cycle --dont forget to point to ExcelDataTableCount
              for (int i = 1; i < 6; i++)
              {
                  LoginPageObject loginObject = new LoginPageObject();

                  UpdatePageObjects pageObj = loginObject.Login(DataLib2.ReadData2(i, "Email"), DataLib2.ReadData2(i, "Password"));
                  test.Log(Status.Info, "Successfully Logged In with DS Data. Email: " + DataLib2.ReadData2(i, "Email") + "With Password: "******"Password"));
                  test.Log(Status.Pass, "Login Passed for Line: " + i);
                  pageObj.UpdateDetails(DataLib2.ReadData2(i, "Initial"), DataLib2.ReadData2(i, "Name"), DataLib2.ReadData2(i, "Surname"),
                                        DataLib2.ReadData2(i, "UpdateEmail"), DataLib2.ReadData2(i, "UpdatePassword"));
                  test.Log(Status.Pass, "Update Passed for: " + DataLib2.ReadData2(i, "Initial"));
              }
          }
          catch (Exception e)
          {
              test.Log(Status.Fail, e.ToString());
              throw;
          }
      }