public void GivenSMSUserIsAlreadyEnrolledIntoTheProgramIfNotThenEnrollTheSMSUserInProgram()
        {
            try
            {
                string isProgramCourseCreated = DatabaseTools.GetCourse(Enumerations.CourseType.ProgramCourse);
                if (isProgramCourseCreated == null || isProgramCourseCreated.Equals("False") || isProgramCourseCreated.Equals(""))
                {
                    GenericTestStep.StepToBrowsedUrlForPegasusUser("CsSmsInstructor");
                    GenericTestStep.StepToLoggedIntoTheCourseSpaceAsSMSInstructor();
                    GenericTestStep.StepToIAmOnThePage("Global Home");
                    GenericTestStep.StepToCreateProgramCourse();
                    GenericTestStep.StepToClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();

                    GenericTestStep.StepToBrowsedUrlForPegasusUser("CsSmsStudent");
                    GenericTestStep.StepToLoggedIntoTheCourseSpaceAsSMSStudent();
                    GenericTestStep.StepToCloseStudentHelpTextWindow();
                    GenericTestStep.StepToIAmOnThePage("Global Home");
                    GenericTestStep.StepToEnrolStudentToCourse("ProductTypeProg");
                    GenericTestStep.StepToClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
                }
            }
            catch (Exception e)
            {
                GenericHelper.Logs(e.ToString(), "FAILED");
                Assert.Fail(e.ToString());
            }
        }
        public void GivenSmsStudentisalreadyenrolledintotheSectionifnotthenenrolltheSmSusertoSection()
        {
            try
            {
                string isStudentEnrolled = DatabaseTools.GetEnrolledUser(Enumerations.UserType.CsSmsStudent);
                if (isStudentEnrolled == null || isStudentEnrolled.Equals("False") || isStudentEnrolled.Equals(""))
                {
                    GenericTestStep.StepToBrowsedUrlForPegasusUser("CsSmsInstructor");
                    GenericTestStep.StepToLoggedIntoTheCourseSpaceAsSMSInstructor();
                    GenericTestStep.StepToIAmOnThePage("Global Home");
                    GenericTestStep.StepToCreateProgramCourse();
                    GenericTestStep.StepToClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();

                    GenericTestStep.StepToBrowsedUrlForPegasusUser("CsSmsStudent");
                    GenericTestStep.StepToLoggedIntoTheCourseSpaceAsSMSStudent();
                    GenericTestStep.StepToCloseStudentHelpTextWindow();
                    GenericTestStep.StepToIAmOnThePage("Global Home");
                    GenericTestStep.StepToEnrolStudentToCourse("ProductTypeProg");
                    GenericTestStep.StepToSelectTheSectionName();
                    GenericTestStep.StepToClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
                }
            }
            catch (Exception e)
            {
                GenericHelper.Logs(e.ToString(), "FAILED");
                Assert.Fail(e.ToString());
            }
        }
 public void WhenIEnrollTheStudentInToTheSection()
 {
     try
     {
         GenericTestStep.StepToBrowsedUrlForPegasusUser("CsSmsStudent");
         GenericTestStep.StepToLoggedIntoTheCourseSpaceAsSMSStudent();
         GenericTestStep.StepToCloseStudentHelpTextWindow();
         GenericHelper.SelectWindow("Global Home");
         WebDriver.SwitchTo().DefaultContent();
         GenericHelper.CloseAnnouncementPage();
         GenericTestStep.StepToEnrolStudentToCourse("ProductTypeProg");
         GenericTestStep.StepToClickedOnTheLogoutLinkToGetLoggedOutFromTheApplication();
     }
     catch (Exception e)
     {
         GenericHelper.Logs(e.ToString(), "FAILED");
         Assert.Fail(e.ToString());
     }
 }