示例#1
0
        public void LogoutOfBlackboardPortal(string linkName, User.UserTypeEnum userType)
        {
            //Login to Blackboard
            Logger.LogMethodEntry("LoginLogout", "LogoutOfBlackboardPortal",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Get User details from memory
            User   user          = User.Get(userType);
            Course course        = Course.Get(Course.CourseTypeEnum.BBCourse);
            string partialWindow = course.Name;

            base.SwitchToPartialWindowTitle(partialWindow);
            switch (userType)
            {
            //Login as BBInstructor
            case User.UserTypeEnum.BBInstructor1:
            case User.UserTypeEnum.BBStudent1:
            case User.UserTypeEnum.BBInstructor:
            case User.UserTypeEnum.BBStudent:
                //Login as BB Instructor/Student
                new BlackboardCourseAction().SignOutByHigherEdUsers(linkName);
                break;
            }
            Logger.LogMethodExit("LoginLogout", "LogoutOfBlackboardPortal",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        public void LoggedInSuccessfully(User.UserTypeEnum userTypeEnum)
        {
            //To Check Login Success
            Logger.LogMethodEntry("LoginLogout", "LoggedInSuccessfully",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Initializing the Variable
            Boolean isUserLoggedIn = false;

            switch (userTypeEnum)
            {
            case User.UserTypeEnum.MMNDInstructor:
            case User.UserTypeEnum.MMNDStudent:
            {
                //Verify If MMNDInstructor Is Logged In Successfully
                isUserLoggedIn = new MyPearsonLoginPage().IsUserLoggedInSuccessFully();
            }
            break;

            case User.UserTypeEnum.MMNDAdmin:
            {
                //Verify If MMNDAdmin Is Logged In Successfully
                isUserLoggedIn = new EPContentPage().IsExitButtonDisplayed();
            }
            break;
            }
            //Assert User Has Logged In Successfully.
            Logger.LogAssertion("VerifyLoginSuccess",
                                ScenarioContext.Current.ScenarioInfo.Title, () => Assert.IsTrue(isUserLoggedIn));
            Logger.LogMethodExit("LoginLogout", "LoggedInSuccessfully",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#3
0
 public void SignInAsPowerSchoolUser(User.UserTypeEnum userTypeEnum)
 {
     //Login into Power School
     Logger.LogMethodEntry("PowerTeacherSignInPage", "SignInAsPowerSchoolUser",
                           base.IsTakeScreenShotDuringEntryExit);
     try
     {
         //Check whether the user is already loggedin or not
         Boolean isUserAlreadyLoggedIn = base.IsElementPresent(By.
                                                               PartialLinkText(PowerTeacherSignInPageResource.
                                                                               PowerTeacherSignInPage_Signout_Link_Id_Locator), 10);
         if (!isUserAlreadyLoggedIn)
         {   //Get the user of the given type from memory
             User user = User.Get(userTypeEnum);
             //Authenticate the user
             this.Authentication(user.Name, user.Password, userTypeEnum);
         }
     }
     catch (Exception e)
     {
         ExceptionHandler.HandleException(e);
     }
     Logger.LogMethodExit("PowerTeacherSignInPage", "SignInAsPowerSchoolUser",
                          base.IsTakeScreenShotDuringEntryExit);
 }
 /// <summary>
 /// Launch SMS registration page.
 /// </summary>
 /// <param name="smsUser">This is the type of user performing the operation.</param>
 private void LaunchSMSRegistrationPage(User.UserTypeEnum smsUser)
 {
     // Launch SMS registration page
     Logger.LogMethodEntry("Reg1Page", "CreateBulkUserUsingExcelValues",
                           base.IsTakeScreenShotDuringEntryExit);
     try
     {
         BrowsePegasusUserURL loginPage = new BrowsePegasusUserURL(smsUser);
         //Login  the type of the user
         Boolean isBasePegasusUrlBrowsedSuccessful =
             loginPage.IsUrlBrowsedSuccessful();
         //Check Is Url Browsed Successfully
         if (isBasePegasusUrlBrowsedSuccessful)
         {
             //Open Url in Browser
             loginPage.GoToLoginUrl();
         }
     }
     catch (Exception e)
     {
         ExceptionHandler.HandleException(e);
     }
     Logger.LogMethodExit("Reg1Page", "CreateBulkUserUsingExcelValues",
                          base.IsTakeScreenShotDuringEntryExit);
 }
        public void LogOutFromMMND(User.UserTypeEnum userTypeEnum)
        {
            //Log out of MMND
            Logger.LogMethodEntry("LoginLogout", "LogOutFromMMND",
                                  base.IsTakeScreenShotDuringEntryExit);
            switch (userTypeEnum)
            {
            case User.UserTypeEnum.MMNDInstructor:
                //Sign Out From Application
                new UserLayoutRootNodeTargetPage().LogoutOfMMND();
                break;

            case User.UserTypeEnum.MMNDStudent:
                //Sign Out From Application
                new UserLayoutRootNodeTargetPage().LogoutAsMMNDStudent();
                break;

            case User.UserTypeEnum.MMNDAdmin:
                //Sign Out From Application
                new EPContentPage().SignOutFromApplication();
                break;
            }
            Logger.LogMethodExit("LoginLogout", "LogOutFromMMND",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#6
0
        public void VerifyTheCreatedUserInManageFrame(
            User.UserTypeEnum userTypeEnum)
        {
            //Verify the UserName in Manage Frame.
            Logger.LogMethodEntry("RumbaUserCreation", "VerifyTheCreatedUserInManageFrame",
                                  base.IsTakeScreenShotDuringEntryExit);
            switch (userTypeEnum)
            {
            case User.UserTypeEnum.RumbaTeacher:
            case User.UserTypeEnum.RumbaNonPSNTeacher:
                //Verify DP Teacher Name
                string userNameTeacher = new CreateUserPage().GetDigitalPathTeacherNameFromMemory(userTypeEnum);
                Logger.LogAssertion("VerifyRumbaTeacherName", ScenarioContext.Current.ScenarioInfo.Title,
                                    () => Assert.AreEqual(userNameTeacher
                                                          , new CreateUserPage().GetUserNameFromManageFrame(userNameTeacher)));
                break;

            case User.UserTypeEnum.RumbaStudent:
                //Verify DP Student Name
                string userNameStudent = new CreateUserPage().GetDigitalPathStudentNameFromMemory();
                Logger.LogAssertion("VerifyRumbaStudentName", ScenarioContext.Current.ScenarioInfo.Title,
                                    () => Assert.AreEqual(userNameStudent
                                                          , new CreateUserPage().GetUserNameFromManageFrame(userNameStudent)));
                break;
            }
            Logger.LogMethodExit("RumbaUserCreation", "VerifyTheCreatedUserInManageFrame",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        /// <summary>
        /// Fill SMS User Access Information.
        /// </summary>
        /// <param name="userType">This is User Type.</param>
        public void EnterSmsUserAccessInformation(User.UserTypeEnum userType, string mode)
        {
            // Fill SMS User Access Information
            Logger.LogMethodEntry("Reg1Page", "EnterSmsUserAccessInformation",
                                  base.IsTakeScreenShotDuringEntryExit);
            Guid   userNameSmsGuid    = Guid.Empty;
            string getSmsUserPassword = string.Empty;

            try
            {
                // Generate SMS User Login Name
                userNameSmsGuid = Guid.NewGuid();
                //Convert GUID to String
                string userNameSmsGuidString = userNameSmsGuid.ToString();
                string password = "******";
                //Fetch access code based on user type
                string accessCode = GetAccessCode(mode, userType);
                // select sms user account number
                this.SelectSmsUserAccountNumber();
                //Enter the data
                this.EnterUserCreationDetails(userType, userNameSmsGuidString, password, accessCode, mode);
                //Save SMS User Details in Memory
                StoreSmsUserInMemory(userType, userNameSmsGuidString, password);
            }
            catch (Exception e)
            {
                ExceptionHandler.HandleException(e);
            }
            Logger.LogMethodExit("Reg1Page", "EnterSmsUserAccessInformation",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#8
0
        public void SignOutFromThePegasus(String linkSignOut,
                                          User.UserTypeEnum userTypeEnum)
        {
            //Method to Clicks on SignOut link
            logger.LogMethodEntry("LoginLogout", "SignOutFromThePegasus",
                                  base.IsTakeScreenShotDuringEntryExit);
            switch (userTypeEnum)
            {
            //Select Pegasus User by Type
            case User.UserTypeEnum.WsTeacher:
            case User.UserTypeEnum.WsStudent:
            case User.UserTypeEnum.CsAdmin:
            case User.UserTypeEnum.NovaNETWsAdmin:
                // Click Sign out link
                new AdminToolPage().SignOutByPegasusUser(linkSignOut);
                break;

            case User.UserTypeEnum.NovaNETCsTeacher:
            case User.UserTypeEnum.NovaNETCsStudent:
                // Click Sign out link
                new LogOutPage().SignOutByNovaNetUser(linkSignOut);
                break;
            }
            logger.LogMethodExit("LoginLogout", "SignOutFromThePegasus",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        /// <summary>
        /// Create New User in Coursespace.
        /// </summary>
        /// <param name="userTypeEnum">This Is User Type Enum.</param>
        /// <returns>User Name.</returns>
        private Guid UpdateCsUser(User.UserTypeEnum userTypeEnum)
        {
            // CreateNewUser for CS user creation
            logger.LogMethodEntry("UpdateUserPage", "CreateCsUser"
                                  , base.IsTakeScreenShotDuringEntryExit);
            //Select Add User Window
            this.SelectUpdateUserWindow();
            // Generate User Login Details Guid
            Guid userInformation = Guid.NewGuid();

            switch (userTypeEnum)
            {
            case User.UserTypeEnum.DPCsNewStudent:
                UpdateCSStudentProfile(userInformation);
                break;

            case User.UserTypeEnum.DPCsOrganizationAdmin:
                UpdateDPCSOrgAdminProfile(userInformation);
                break;
            }

            logger.LogMethodExit("UpdateUserPage", "CreateCsUser",
                                 base.IsTakeScreenShotDuringEntryExit);
            return(userInformation);
        }
示例#10
0
        public void EnterIntoD2LCourse(Course.CourseTypeEnum courseType, User.UserTypeEnum userType)
        {
            logger.LogMethodEntry("D2LCourseActions", "EnterIntoD2LCourse", base.IsTakeScreenShotDuringEntryExit);

            // Get the course name
            Course course     = Course.Get(courseType);
            string courseName = course.Name.ToString();

            // Based on user type click on the course
            switch (userType)
            {
            case User.UserTypeEnum.D2LDirectTeacher:
            case User.UserTypeEnum.D2LKioskTeacher1:
                this.D2LUserEnterIntoCourse(courseType);
                break;

            case User.UserTypeEnum.D2LDirectStudent:
            case User.UserTypeEnum.D2LKioskStudent1:
                // base.WaitUntilWindowLoads(base.GetPageTitle);

                //Select the course and Click
                base.WaitForElement(By.XPath(D2LCourseActionsResource.
                                             D2LCourseAction_Page_CourseSelector_Xpath_Value));
                base.ClickLinkByXPath(D2LCourseActionsResource.
                                      D2LCourseAction_Page_CourseSelector_Xpath_Value);

                base.WaitForElement(By.PartialLinkText(courseName));
                base.ClickLinkByPartialLinkText(courseName);
                break;
            }
            logger.LogMethodExit("D2LCourseActions", "EnterIntoD2LCourse", base.IsTakeScreenShotDuringEntryExit);
        }
示例#11
0
        /// <summary>
        /// To signout from D2L.
        /// </summary>
        public void D2LSignOut(User.UserTypeEnum userType)
        {
            //To signout from D2L
            logger.LogMethodEntry("D2LCourseActions", "D2LSignOut",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Click on the User name to get Logout menu
            base.SwitchToPartialWindowTitle("Pegasus Tools");
            User   user     = User.Get(userType);
            string userName = user.FirstName + " " + user.LastName;
            bool   pres     = base.IsElementPresent(By.XPath(string.
                                                             Format(D2LCourseActionsResource.
                                                                    D2LCourseAction_Page_UserNameDropDown_Xpath_Value, userName)), 10);
            IWebElement userNameMenu = base.GetWebElementPropertiesByXPath
                                           (string.Format(D2LCourseActionsResource.
                                                          D2LCourseAction_Page_UserNameDropDown_Xpath_Value, userName));

            base.ClickByJavaScriptExecutor(userNameMenu);
            IWebElement logoutLink = base.GetWebElementPropertiesByLinkText
                                         (D2LCourseActionsResource.
                                         D2LCourseAction_Page_LogOut_LinkText_Value);

            base.ClickByJavaScriptExecutor(logoutLink);
            logger.LogMethodExit("D2LCourseActions", "D2LSignOut",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#12
0
        public void SignOutByTheUser(String linkSignOut,
                                     User.UserTypeEnum userTypeEnum)
        {
            //Method to Clicks on SignOut link
            Logger.LogMethodEntry("LoginLogout",
                                  "SignOutByTheUser",
                                  base.IsTakeScreenShotDuringEntryExit);
            switch (userTypeEnum)
            {
            case User.UserTypeEnum.HedWsAdmin:
            case User.UserTypeEnum.HedCsAdmin:
            case User.UserTypeEnum.CsSmsInstructor:
            case User.UserTypeEnum.CsSmsStudent:
            case User.UserTypeEnum.HedTeacherAssistant:
            case User.UserTypeEnum.HedProgramAdmin:
            case User.UserTypeEnum.HedWsInstructor:
                //Click On Sign Out Link
                new AdminToolPage().SignOutByHigherEdUsers(linkSignOut);
                break;

            case User.UserTypeEnum.ECollegeAdmin:
            case User.UserTypeEnum.ECollegeTeacher:
            case User.UserTypeEnum.ECollegeStudent:
                //Click On Sign Out Link
                new HomePSHPage().SignOutByECollegeUsers(linkSignOut);
                break;
            }
            Logger.LogMethodExit("LoginLogout", "SignOutByTheUser",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
/// <summary>
/// Accepts usertype, scans username and password stored in respective environment xml
/// and uses to sign In
/// </summary>
/// <param name="user">the user enum</param>

        public void MMNDLogin(User.UserTypeEnum user)
        {
            IWebElement keyIn    = null;
            User        mmndUser = User.Get(user);


            try
            {
                base.IsElementPresent(userName);
                keyIn = base.GetWebElementProperties(userName);
                keyIn.SendKeys(mmndUser.Name);

                base.IsElementPresent(passWord);
                keyIn = base.GetWebElementProperties(passWord);
                keyIn.SendKeys(mmndUser.Password);

                base.IsElementPresent(signIn);
                keyIn = base.GetWebElementProperties(signIn);
                base.ClickByJavaScriptExecutor(keyIn);
            }


            catch (Exception e)
            {
                throw e;
            }
        }
示例#14
0
        public void LoggedInSuccessfully(User.UserTypeEnum userTypeEnum)
        {
            //To Check Login Success
            Logger.LogMethodEntry("LoginLogout", "LoggedInSuccessfully",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Initializing the Variable
            Boolean isUserLoggedIn = false;

            switch (userTypeEnum)
            {
            case User.UserTypeEnum.BBInstructor1:
            case User.UserTypeEnum.BBStudent1:
            case User.UserTypeEnum.BBInstructor:
            case User.UserTypeEnum.BBStudent:
            {
                //Verify If MMNDInstructor Is Logged In Successfully
                isUserLoggedIn = new BlackboardLoginPage().IsUserLoggedInSuccessFully();
            }
            break;

            case User.UserTypeEnum.MoodleKioskStudent:
            case User.UserTypeEnum.MoodleKioskTeacher:
            {
                //Verify If MMNDInstructor Is Logged In Successfully
                isUserLoggedIn = new MoodleLoginPage().IsUserLoggedInSuccessFullyMoodle();
            }
            break;
            }
            //Assert User Has Logged In Successfully.
            Logger.LogAssertion("VerifyLoginSuccess",
                                ScenarioContext.Current.ScenarioInfo.Title, () => Assert.IsTrue(isUserLoggedIn));
            Logger.LogMethodExit("LoginLogout", "LoggedInSuccessfully",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        public void LaunchTheSkillStudyPlanPreTestActivity(
            User.UserTypeEnum userTypeEnum)
        {
            // Open The Activity
            Logger.LogMethodEntry("LaunchActivity", "LaunchTheSkillStudyPlanPreTestActivity",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Assert for Launch of PreTest Presentation window
            Logger.LogAssertion("VerifyPrsentationLaunch", ScenarioContext.Current.ScenarioInfo.Title,
                                () => Assert.IsTrue(new PlayerTestPage().IsSkillStudyPlanPreTestPreviewLaunched()));
            // Switch to different roles as per the activity presentation behaviour
            switch (userTypeEnum)
            {
            // Close Activity by Ws Teacher
            case User.UserTypeEnum.WsTeacher:
                new DRTPreviewUXPage().ClickOnCancelButton();
                break;

            // Close Activity by Ws Student
            case User.UserTypeEnum.WsStudent:
                new DRTPreviewUXPage().ClickOnReturnToCourseButton();
                break;
            }
            Logger.LogMethodExit("LaunchActivity", "LaunchTheSkillStudyPlanPreTestActivity",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#16
0
 /// <summary>
 /// Copy Master Course In Other Workspace.
 /// </summary>
 /// <param name="courseTypeEnum">This is course type emum.</param>
 public void CopyMasterCourseInDifferentWorkspace
     (Course.CourseTypeEnum courseTypeEnum, User.UserTypeEnum userTypeEnum)
 {
     //Copy Master Course In Different Workspace
     logger.LogMethodEntry("NewCoursePage", "CopyMasterCourseInDifferentWorkspace",
                           base.IsTakeScreenShotDuringEntryExit);
     try
     {
         //Select Window
         SelectCopyAsMasterCourseWindow();
         //Enter Course Name
         String courseName = this.GetCourseName("Another Workspace");
         //Select Option To Copy Course To Other WorkSpace
         this.SelectCopyToAnotherWorkspaceOption();
         //Select WorkSpace Name
         this.SelectWorkSpaceName(userTypeEnum);
         // Select Course Save Button
         this.ClickOnSaveCourseButton();
         // Store Course Information In Memory
         this.StoreCourseDetailsInMemory(courseName, courseTypeEnum);
     }
     catch (Exception e)
     {
         ExceptionHandler.HandleException(e);
     }
     logger.LogMethodExit("NewCoursePage", "CopyMasterCourseInDifferentWorkspace",
                          base.IsTakeScreenShotDuringEntryExit);
 }
        /// <summary>
        /// Canvas user login
        /// </summary>
        public void UserLoginToCanvas(User.UserTypeEnum userType)
        {
            User   user     = User.Get(userType);
            string userName = user.Name.ToString();
            string passord  = user.Password.ToString();

            // Wait for window
            base.WaitUntilWindowLoads(CanvasUserLoginResource.
                                      CanvasUserLogin_Page_LoginPage_PageTitle);
            base.SelectWindow(CanvasUserLoginResource.
                              CanvasUserLogin_Page_LoginPage_PageTitle);

            // Enter user name
            base.WaitForElement(By.Id(CanvasUserLoginResource.
                                      CanvasUserLogin_Page_UserName_Textbox_ID_Value));
            base.ClearTextById(CanvasUserLoginResource.
                               CanvasUserLogin_Page_UserName_Textbox_ID_Value);
            base.FillTextBoxById(CanvasUserLoginResource.
                                 CanvasUserLogin_Page_UserName_Textbox_ID_Value, userName);

            // Enter password
            base.WaitForElement(By.Id(CanvasUserLoginResource.
                                      CanvasUserLogin_Page_Password_Textbox_ID_Value));
            base.ClearTextById(CanvasUserLoginResource.
                               CanvasUserLogin_Page_Password_Textbox_ID_Value);
            base.FillTextBoxById(CanvasUserLoginResource.
                                 CanvasUserLogin_Page_Password_Textbox_ID_Value, passord);

            // Click submit button
            IWebElement getSubmitButton = base.GetWebElementPropertiesById(CanvasUserLoginResource.
                                                                           CanvasUserLogin_Page_Password_Textbox_ID_Value);

            getSubmitButton.SendKeys(Keys.Return);
        }
        /// <summary>
        /// Click Report Link In HSS
        /// </summary>
        /// <param name="reportName"></param>
        /// <param name="userTypeEnum"></param>
        public void ClickReportLinkInHSS(string reportName, User.UserTypeEnum userTypeEnum)
        {
            switch (userTypeEnum)
            {
            case User.UserTypeEnum.HSSCsSmsInstructor:

                base.SwitchToLastOpenedWindow();
                // Select main Frame
                base.WaitForElement(By.Id(RptMainPageResource.
                                          RptMain_Page_MainFrame_Id_Locator));
                base.SwitchToIFrame(RptMainPageResource.
                                    RptMain_Page_MainFrame_Id_Locator);
                int getreportLinkCount = base.GetElementCountByXPath(RptMainPageResource.RptMain_Page_Report_LinksCount_Xpath_Locator);

                for (int i = 3; i <= getreportLinkCount; i++)
                {
                    string getreportLinkName = base.GetElementTextByXPath(string.Format
                                                                              (RptMainPageResource.RptMain_Page_Report_LinksName_Xpath_Locator, i));
                    if (getreportLinkName == reportName)
                    {
                        IWebElement reportLinkName = base.GetWebElementPropertiesByXPath(string.Format
                                                                                             (RptMainPageResource.RptMain_Page_Report_LinksName_Xpath_Locator, i));
                        base.ClickByJavaScriptExecutor(reportLinkName);
                        break;
                    }
                }
                break;
            }
        }
        /// <summary>
        /// Enter SMS User Login Details.
        /// </summary>
        private string EnterSmsUserLoginDetails(User.UserTypeEnum userType)
        {
            //Enter SMS User Details
            Logger.LogMethodEntry("Reg1Page", "EnterSmsUserLoginDetails",
                                  base.IsTakeScreenShotDuringEntryExit);
            // Generate SMS User Password
            string getSmsUserPassword = Reg1PageResource.
                                        Reg1_Page_SMSUser_Password_Value;

            //Enter Password in Text Box
            base.FillTextBoxById(Reg1PageResource.
                                 Reg1_Page_CreateLoginPassword_TextBox_Id_Locator,
                                 Reg1PageResource.Reg1_Page_SMSUser_Password_Value);
            //Wait For Element
            base.WaitForElement(By.Id(Reg1PageResource.
                                      Reg1_Page_CreateLoginPasswordRetype_TextBox_Id_Locator));
            //Clear the Text Box
            base.ClearTextById(Reg1PageResource.
                               Reg1_Page_CreateLoginPasswordRetype_TextBox_Id_Locator);
            //Enter Password in Re-Type Text Box
            base.FillTextBoxById(Reg1PageResource.
                                 Reg1_Page_CreateLoginPasswordRetype_TextBox_Id_Locator,
                                 Reg1PageResource.Reg1_Page_SMSUser_Password_Value);
            //Click on TextBox to Enter Access Code Details
            this.ClickTextBoxToEnterSmsAccessCode(userType);
            Logger.LogMethodExit("Reg1Page", "EnterSmsUserLoginDetails",
                                 base.IsTakeScreenShotDuringEntryExit);
            return(getSmsUserPassword);
        }
示例#20
0
        /// <summary>
        /// Get ZeroScore User name.
        /// </summary>
        /// <param name="userTypeEnum">This is user type enum.</param>
        /// <returns>Student first and last name.</returns>
        public string Get100ScoreUsername(User.UserTypeEnum userTypeEnum)
        {
            //Get ZeroScore User name.
            logger.LogMethodEntry("RptAllAssessmentAllStudentPage", "GetZeroScoreUsername",
                                  base.IsTakeScreenShotDuringEntryExit);
            string zeroScoreStudentName = string.Empty;

            try
            {
                switch (userTypeEnum)
                {
                case User.UserTypeEnum.CsSmsStudent:
                {
                    User user = User.Get(userTypeEnum);
                    zeroScoreStudentName = user.LastName + ", " + user.FirstName;
                    break;
                }
                }
            }
            catch (Exception e)
            {
                ExceptionHandler.HandleException(e);
            }
            logger.LogMethodExit("RptAllAssessmentAllStudentPage", "GetZeroScoreUsername",
                                 base.IsTakeScreenShotDuringEntryExit);
            return(zeroScoreStudentName);
        }
        /// <summary>
        /// Enter SMS User Access Information.
        /// </summary>
        /// <param name="userType">This is User Type.</param>
        public void EnterSmsUserAccessInformationforMmndStudent(User.UserTypeEnum userType)
        {
            //Fill SMS User Access Information
            Logger.LogMethodEntry("Reg1Page", "EnterSMSUserAccessInformationforMMNDStudent",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Generate SMS User Login Name
            Guid userNameSmsGuid = Guid.NewGuid();

            base.SelectWindow(Reg1PageResource.
                              Reg1_Page_AccessInformation_Window_Page_Title);
            //Wait For Element
            base.WaitForElement(By.Id(Reg1PageResource.
                                      Reg1_Page_AccountNo_RadioButton_Id_Locator));
            //Is Element Already Selected
            if (!base.IsElementSelectedById(Reg1PageResource.
                                            Reg1_Page_AccountNo_RadioButton_Id_Locator))
            {
                base.FocusOnElementById(Reg1PageResource.
                                        Reg1_Page_AccountNo_RadioButton_Id_Locator);
                base.ClickButtonById(Reg1PageResource.
                                     Reg1_Page_AccountNo_RadioButton_Id_Locator);
            }
            //Enter User Name
            this.EnterUserName(userNameSmsGuid);
            string getSmsUserPassword = this.EnterSmsUserLoginDetails(userType);

            //Save SMS User Details in Memory
            StoreSmsUserInMemory(userType, userNameSmsGuid.ToString(), getSmsUserPassword);
            Logger.LogMethodExit("Reg1Page", "EnterSMSUserAccessInformationforMMNDStudent",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#22
0
        /// <summary>
        /// D2L user login
        /// </summary>
        /// <param name="userType">This is the user type enum.</param>
        public void LoginToD2L(User.UserTypeEnum userType)
        {
            logger.LogMethodEntry("D2LUserLogin", "LoginToD2L", base.IsTakeScreenShotDuringEntryExit);
            // Select window
            base.SwitchToWindow(D2LUserLoginResource.
                                D2LUserLogin_Page_Title_Name);
            User   user     = User.Get(userType);
            string userName = user.Name.ToString();
            string password = user.Password.ToString();


            // Enter username
            base.WaitForElement(By.Id(D2LUserLoginResource.
                                      D2LUserLogin_UserName_TextBox_ID_value));
            base.ClearTextById(D2LUserLoginResource.
                               D2LUserLogin_UserName_TextBox_ID_value);
            base.FillTextBoxById(D2LUserLoginResource.
                                 D2LUserLogin_UserName_TextBox_ID_value, userName);

            // Enter password
            base.WaitForElement(By.Id(D2LUserLoginResource.
                                      D2LUserLogin_Password_TextBox_ID_value));
            base.ClearTextById(D2LUserLoginResource.
                               D2LUserLogin_Password_TextBox_ID_value);
            base.FillTextBoxById(D2LUserLoginResource.
                                 D2LUserLogin_Password_TextBox_ID_value, password);

            // Click on login button
            base.WaitForElement(By.PartialLinkText(D2LUserLoginResource.
                                                   D2LUserLogin_LoginButton_Name));
            base.ClickButtonByPartialLinkText("Log In");

            logger.LogMethodExit("D2LUserLogin", "LoginToD2L", base.IsTakeScreenShotDuringEntryExit);
        }
        /// <summary>
        /// Enter the SMS user details
        /// </summary>
        /// <param name="userType">This is the user type.</param>
        /// <param name="userNameSmsGuid">This is the auto generated username.</param>
        private string EnterSmsUserDetails(User.UserTypeEnum userType, string userNameSmsGuid)
        {
            // Enter the SMS user details
            Logger.LogMethodEntry("Reg1Page", "EnterSmsUserDetails",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Wait for Element
            base.WaitForElement(By.Id(Reg1PageResource.
                                      Reg1_Page_New_SMSUser_Loginname_TextBox_Id_Locator));
            base.ClearTextById(Reg1PageResource.
                               Reg1_Page_New_SMSUser_Loginname_TextBox_Id_Locator);
            //Fill the User name in Text Box
            base.FillTextBoxById(Reg1PageResource.
                                 Reg1_Page_New_SMSUser_Loginname_TextBox_Id_Locator,
                                 userNameSmsGuid);
            //Wait For Element
            base.WaitForElement(By.Id(Reg1PageResource.
                                      Reg1_Page_CreateLoginPassword_TextBox_Id_Locator));
            //Clear the Text Box
            base.ClearTextById(Reg1PageResource.
                               Reg1_Page_CreateLoginPassword_TextBox_Id_Locator);
            //Enter SMS User Details (Extracted Method)
            string getSmsUserPassword = this.EnterSmsUserLoginDetails(userType);

            //Enter SMS User Access Code
            this.EnterSmsUserAccessCode(userType);
            Logger.LogMethodExit("Reg1Page", "EnterSmsUserDetails",
                                 base.IsTakeScreenShotDuringEntryExit);
            return(getSmsUserPassword);
        }
        /// <summary>
        /// Select User Role from
        /// SelectUserStatus_DropDown.
        /// </summary>
        /// <param name="userTypeEnum">User Type Enum.</param>
        private void SelectUserRole(User.UserTypeEnum userTypeEnum)
        {
            //Select User Role from Dropdown
            logger.LogMethodEntry("EnrollCourseTop", "SelectUserRole",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Switch to Top Conten Area Frame
            this.SelectTopContentAreaFrame();
            //Select User Rool from User status drop down
            base.WaitForElement(By.Name(EnrollCourseTopResource.
                                        EnrollCourseTop_Page_SelectUserStatus_DropDown_ID_Locator));
            //Get property of User Status drop down
            IWebElement userStatusElement = base.
                                            GetWebElementPropertiesByName(EnrollCourseTopResource.
                                                                          EnrollCourseTop_Page_SelectUserStatus_DropDown_ID_Locator);

            // Click on User status drop down
            base.ClickByJavaScriptExecutor(userStatusElement);
            //Select user role from dropdown
            switch (userTypeEnum)
            {
            case User.UserTypeEnum.ECollegeTeacher:
                //Select Teacher role from dropdown
                this.SelectTeacherRoleFromDropdown();
                break;

            case User.UserTypeEnum.ECollegeStudent:
                //Select Student role from dropdown
                this.SelectStudentRoleFromDropdown();
                break;
            }
            logger.LogMethodExit("EnrollCourseTop", "SelectUserRole",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        public void LoginToMMND(User.UserTypeEnum userTypeEnum)
        {
            //Login to MMND
            Logger.LogMethodEntry("LoginLogout", "LoginToMMND",
                                  base.IsTakeScreenShotDuringEntryExit);
            //Get User details from memory
            User user = User.Get(userTypeEnum);

            switch (userTypeEnum)
            {
            //Login as MMNDInstructor
            case User.UserTypeEnum.MMNDInstructor:
            case User.UserTypeEnum.MMNDStudent:
                //Login as MMND Instructor/Student
                new MyPearsonLoginPage().LoginToMMND(user.Name, user.Password);
                break;

            //Login as MMNDAdmin
            case User.UserTypeEnum.MMNDAdmin:
                //Login as MMND admin
                new LoginContentPage().Login(user.Name, user.Password);
                break;
            }
            Logger.LogMethodExit("LoginLogout", "LoginToMMND",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        /// <summary>
        /// Enroll into Term and course.
        /// </summary>
        /// <param name="userTypeEnum">This is user type Enum.</param>
        /// <param name="courseTypeEnum">This is course type Enum./</param>
        public void EnrollUserToECollegeCourse(User.UserTypeEnum userTypeEnum,
                                               Course.CourseTypeEnum courseTypeEnum)
        {
            //Enroll ECollege user into Term and Course
            logger.LogMethodEntry("EnrollCourseTop", "EnrollUserToECollegeCourse",
                                  base.IsTakeScreenShotDuringEntryExit);
            try
            {
                //Switch to TopContentArea Frame
                this.SelectTopContentAreaFrame();
                //Select Term
                this.SelectTermFromDropDown();
                //Select User check box
                this.SelectUserCheckBox();
                //Click on Next button after select user
                this.ClickNextButtonOnSelectUserPage();
                //Select User role form dropdown
                this.SelectUserRole(userTypeEnum);
                //Select course checkbox element
                this.SelectCourseCheckBox(courseTypeEnum);
                //Click Enroll button
                this.ClickEnrollButton();
            }
            catch (Exception e)
            {
                ExceptionHandler.HandleException(e);
            }

            logger.LogMethodExit("EnrollCourseTop", "EnrollUserToECollegeCourse",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
        public void RegisterNewSmsUser(User.UserTypeEnum userTypeEnum, string mode)
        {
            // Create New SMS User
            Logger.LogMethodEntry("SMSRegistration", "RegisterNewSmsUser",
                                  base.IsTakeScreenShotDuringEntryExit);
            switch (userTypeEnum)
            {
            case User.UserTypeEnum.MMNDInstructor:
                //Click I Accept Button
                new ConsentPage().ClickIAcceptButtonBySMSAdmin();
                //submit Access Information
                new Reg1Page().EnterSmsUserAccessInformation(userTypeEnum, mode);
                //Submit Account Information
                new Reg2Page().EnterSmsUserAccountInformation(userTypeEnum);
                break;

            case User.UserTypeEnum.MMNDStudent:
                //Enter Access Code
                new CourseIdInputPage().EnterAccessCode();
                //Click I Accept Button
                new ConsentPage().ClickIAcceptButtonBySMSAdmin();
                //submit Access Information
                new Reg1Page().EnterSmsUserAccessInformationforMmndStudent(userTypeEnum);
                //Submit Account Information
                new Reg2Page().EnterSmsUserAccountInformation(userTypeEnum);
                break;
            }
            Logger.LogMethodExit("SMSRegistration", "RegisterNewSmsUser",
                                 base.IsTakeScreenShotDuringEntryExit);
        }
示例#28
0
 public void SignOutFromThePegasus(String linkSignOut,
                                   User.UserTypeEnum userTypeEnum)
 {
     //Method to Clicks on SignOut link
     Logger.LogMethodEntry("LoginLogout", "SignOutFromThePegasus",
                           base.IsTakeScreenShotDuringEntryExit);
     switch (userTypeEnum)
     {
     case User.UserTypeEnum.HedWsAdmin:
     case User.UserTypeEnum.HedCsAdmin:
     case User.UserTypeEnum.CsSmsInstructor:
     case User.UserTypeEnum.CsSmsStudent:
     case User.UserTypeEnum.HSSCsSmsInstructor:
     case User.UserTypeEnum.HSSCsSmsStudent:
     case User.UserTypeEnum.HedTeacherAssistant:
     case User.UserTypeEnum.HedProgramAdmin:
     case User.UserTypeEnum.HedWsInstructor:
     case User.UserTypeEnum.HSSProgramAdmin:
         // Click Sign out link
         new AdminToolPage().SignOutByHigherEdUsers(linkSignOut);
         break;
     }
     Logger.LogMethodExit("LoginLogout", "SignOutFromThePegasus",
                          base.IsTakeScreenShotDuringEntryExit);
 }
 public void ValidatePegasusGradebookPage(string pageName, User.UserTypeEnum userType)
 {
     logger.LogMethodEntry("D2LDirect", "ValidatePegasusGradebookPage", base.IsTakeScreenShotDuringEntryExit);
     Assert.AreEqual
         (true, new D2LCourseActions().GetGradeBookExistance(pageName, userType));
     logger.LogMethodExit("D2LDirect", "ValidatePegasusGradebookPage", base.IsTakeScreenShotDuringEntryExit);
 }
示例#30
0
        public void SignOutFromThePegasus(string linkSignOut,
                                          User.UserTypeEnum userTypeEnum)
        {
            //Method to Clicks on SignOut link
            Logger.LogMethodEntry("LoginLogout", "SignOutFromThePegasus",
                                  base.IsTakeScreenShotDuringEntryExit);
            switch (userTypeEnum)
            {
            case User.UserTypeEnum.HedWsAdmin:
            case User.UserTypeEnum.HedMiLWsAdmin:
            case User.UserTypeEnum.HedCsAdmin:
            case User.UserTypeEnum.CsSmsInstructor:
            case User.UserTypeEnum.CsSmsStudent:
            case User.UserTypeEnum.HedTeacherAssistant:
            case User.UserTypeEnum.HedProgramAdmin:
            case User.UserTypeEnum.HedWsInstructor:
            case User.UserTypeEnum.HedMilAcceptanceInstructor:
            case User.UserTypeEnum.HEDWSCTGPublisherAdmin:
            case User.UserTypeEnum.HedMilPPEStudent:
                // Click Sign out link
                new AdminToolPage().SignOutByHigherEdUsers(linkSignOut);
                break;

            case User.UserTypeEnum.BBInstructor:
                new BlackboardCourseAction().SignOutByHigherEdUsers(linkSignOut);
                break;
            }
            Logger.LogMethodExit("LoginLogout", "SignOutFromThePegasus",
                                 base.IsTakeScreenShotDuringEntryExit);
        }