public void WhenICreatedTheUserAsStudent(Table table)
 {
     try
     {
         bool isWindowPresent = GenericHelper.IsPopUpWindowPresent("Manage Organization");
         if (isWindowPresent)
         {
             GenericHelper.SelectWindow("Manage Organization");
             WebDriver.SwitchTo().DefaultContent();
         }
         else
         {
             // WebDriver.Close();
             string schoolName = DatabaseTools.GetOrganization(Enumerations.OrgLevelType.School);
             _organizationManagement.SearchAndSelectOrg(schoolName);
         }
         // Purpose: To Create Users
         _manageUserPage.Createusers(table);
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         if (GenericHelper.IsPopUpWindowPresent("Manage Organization"))
         {
             GenericHelper.SelectWindow("Manage Organization");
             WebDriver.Close();
         }
         GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
         throw new Exception(e.ToString());
     }
 }
Beispiel #2
0
 public void GivenISelectedTheDistrictLevelOfOrganization()
 {
     try
     {
         string distName = DatabaseTools.GetOrganization(Enumerations.OrgLevelType.District);
         _organizationManagement.SearchAndSelectOrg(distName);
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         GenericDefinitions.ThenIClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
         Thread.Sleep(3000);
         throw new Exception(e.ToString());
     }
 }