public void AssingCurriculum()    //public void AssingCurriculum(string curriculumName)
        {
            string curriculumName = "new1111";
            ///  1. Navigate to the login page and login as Manager ("10031315","password")
            UserInfo            role = UserUtils.GetUser(UserRole.Manager);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser(role.Username, role.Password);

            ///  2. click to CGEP link and waiting load icon disappear
            GCEPPage GCEP = ED.ClickToAdvance(ED.GcepLnk);

            ///  3. From GCEP page click to curriculum template Link and Navigate curriculum management page and searching for curriculum created by AMA
            CurriculumMngPage CurTempPage = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);

            CurTempPage.Search(curriculumName);

            ///  4.Clicking to Assign To Programm and redirecting Assign Program page
            CurTempPage.Actioncell.Click();

            ///  5. Choosing starting date and ending date for  program  and clicking next button
            AssignProgramPage Assign       = CurTempPage.ClickToAdvance(CurTempPage.AssignToProgrammLnk);
            string            StartingDate = Assign.ChoosingStartDate();
            string            EndingDate   = Assign.ChoosingEndDate(1, "M/d/yyyy");
            AssignSummaryPage Summary      = Assign.ClickToAdvance(Assign.NextBtn);

            ///  6. Verifying from Assign Summary page program is displayed
            Assert.IsTrue(Summary.CreatedProgramName.Displayed);
            Assert.AreEqual((Summary.CreatedProgramName.Text), curriculumName);
            Thread.Sleep(1000);

            ///  7.Verifying Assing confirmation test page curriculum name and starting date and ending dates are there which we choose.
            AssignConfirmationPage Confirmation = Summary.ClickToAdvance(Summary.NextBtn);

            Assert.IsTrue(Confirmation.Grid_CellTextFound(Confirmation.ProgramSummaryTbl, StartingDate + " - " + EndingDate));
            //Confirmation.ConfirmBtn.Click();
        }
        public void CourseTracker_Resident_RequiredCoursePass()
        {
            ///  1.Navigate to the login page login as a AMA staff
            UserInfo            role = UserUtils.GetUser(UserRole.Ama_Staff);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser("10021373", "password");

            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, ElementCriteria.IsEnabled);
            }

            ///  2.click to GCEP link  navigate to Gcep page and waiting load icon disappear
            GCEPPage Gcep = ED.ClickToAdvance(ED.GcepLnk);


            string CourseTracker = Gcep.ResidentCourseTrackerLbl.Text;

            if (!CourseTracker.Contains('/'))
            {
                if (!CourseTracker.Contains("0"))
                {
                    string[] CourseTrackernotNull = CourseTracker.Split(' ');
                    int      regCoursCount        = Convert.ToInt16(CourseTrackernotNull[3]);
                }
                else
                {
                    string[] CoursetrackerwithNull = CourseTracker.Split(' ');
                    int      NoRegCourse           = Convert.ToInt16(CoursetrackerwithNull[2]);
                }
                Gcep.ClickToAdvance(Gcep.SignOutLnk);

                LP = Navigation.GoToLoginPage(browser);
                ED = LP.LoginAsUser(role.Username, role.Password);
                if (BrowserName == BrowserNames.Firefox)
                {
                    Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, ElementCriteria.IsEnabled);
                }
                Gcep = ED.ClickToAdvance(ED.GcepLnk);

                ///  3.from Gcep navigating to institution managment searching for institution looking for curriculum and if their any curriculum with the same name deleting and starting create new curriculum.
                InstitutionsPage     Instute1 = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);
                InstitutionsGCEPPage InsGcep1 = Instute1.SearchforInstitutions("Ellis Hospital");

                ProgramsPage Program1 = InsGcep1.ClickToAdvance(InsGcep1.InstitutionProgramManagmentLnk);
                Program1.UnassignCurriculum();


                CurriculumMngPage Curriculum1 = InsGcep1.ClickToAdvance(InsGcep1.InstitutionCurriculumTmpLnk);
                Curriculum1.Search("Learning111!!!");
                Curriculum1.DeleteCurriculum("Learning111!!!");
                CurriculumCoursePage CurCoursPage = Curriculum1.ClickToAdvance(Curriculum1.CreateCurriculumTemplateBtn);

                ///  4.Form course page choosing available courses from table by index
                CurCoursPage.AddOrRemoveCourses(CurCoursPage.AvailableCoursesTbl, CurCoursPage.AddSelectedBtn, 8, 9, 10, 11, 12, 13, 14, 15, 16);

                // List<string> CourseNames = new List<string>();
                List <string> CourseNames = CurCoursPage.GetTheNamesChoosenCourses();


                int CountofCoursewasAssigned = CourseNames.Count;


                ///  5. Giving the name for curriculum passing parameter from TestCase as a string
                CurCoursPage.CurriculumNameTxt.Clear();
                CurCoursPage.CurriculumNameTxt.SendKeys("Learning111!!!");

                ///  6.Saving curriculum and navigating to the pgy pages to assigne course to students
                PGYAssignmentPage PGY = CurCoursPage.ClickToAdvance(CurCoursPage.NextBtn);

                ///  7.Choosing student years to assign course by index for each course
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 1, 4);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 2, 4);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 3, 4);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 4, 4);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 5, 4);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 6, 4);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 7, 4);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 8, 4);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 9, 4);


                ///  8. Saving curriculum and navigating to curriculum management page again
                PGY.ClickToAdvance(PGY.SaveExitBtn);

                /// 9.Finding curriculum what we create and assigning to the programm
                Curriculum1.Search("Learning111!!!");
                Curriculum1.Actioncell.Click();
                AssignProgramPage Assign = Curriculum1.ClickToAdvance(Curriculum1.AssignToProgrammLnk);

                ///  10.Choosing starting date and ending date for  program  and clicking next button
                string StartingDate = Assign.ChoosingStartDate();
                string EndingDate   = Assign.ChoosingEndDate(1, "MM/d/yyyy");
                Assign.AssignProgramm();
                AssignSummaryPage Summary = Assign.ClickToAdvance(Assign.NextBtn);

                ///  11.Verifying from Assign Summary page program is displayed
                Assert.IsTrue(Summary.CreatedProgramName.Displayed);
                Assert.AreEqual((Summary.CreatedProgramName.Text), "Learning111!!!");

                ///  12.Verifying Assing confirmation test page curriculum name and starting date and ending dates are there which we choose.
                AssignConfirmationPage Confirmation = Summary.ClickToAdvance(Summary.NextBtn);
                // Assert.IsTrue(Confirmation.Grid_CellTextFound(Confirmation.ProgramSummaryTbl, StartingDate + " - " + EndingDate));
                Thread.Sleep(0500);
                Confirmation.ConfirmBtn.Click();

                ///  13.Signing out and Signing in as a Resindent counting required courses from myRequiredCourses
                Curriculum1.ClickToAdvance(Curriculum1.SignOutLnk);

                Thread.Sleep(2500);
                LP   = Navigation.GoToLoginPage(browser);
                ED   = LP.LoginAsUser("10021373", "password");//10021375,10021377,21387
                Gcep = ED.ClickToAdvance(ED.GcepLnk);
                //Assert.True(Gcep.VerificationOfChoosenCoursesAssignedForResident(browser, CourseNames), "Course count are not equal");
                Thread.Sleep(2000);
                string   CourseTrackerAfterAssignment = Gcep.ResidentCourseTrackerLbl.Text;
                string[] courseword2 = CourseTrackerAfterAssignment.Split(' ');
                //string[] countofcourses1 = courseword2[2].Split('/');
                //string[] courseword = CourseTracker.Split(' ');
                int CountofcoursesOnResidentGcepaftercourseAssignment = Convert.ToInt16(courseword2[3]);

                Thread.Sleep(2000);
                int CountofcoursesOnResidentGcepaftercourseAssigmentCompleted = Convert.ToInt16(courseword2[2]);

                Thread.Sleep(2000);

                Assert.True(CountofcoursesOnResidentGcepaftercourseAssignment.Equals(CountofCoursewasAssigned));
            }
            do
            {
                ElemSet.ScrollToElement(browser, Gcep.FaceBookLnk);
            }while (!Gcep.ResidentGcepShowElectiveCourseLnk.Displayed);


            ElemSet.ScrollToElement(browser, Gcep.ResidentCourseTrackerLbl);

            CourseTestPage Course = Gcep.ResidentStartCourseOrContinue(browser, "AUTOMATION_002");


            Gcep = Course.TestPass();

            do
            {
                ElemSet.ScrollToElement(browser, Gcep.FaceBookLnk);
            }while (!Gcep.ResidentGcepShowElectiveCourseLnk.Displayed);

            Assert.IsTrue(Gcep.VerificationCourseCompletion(browser, "AUTOMATION_002", "View Certificate"), "View Certificet button not visible");

            string CourseTrackerAfterTestCompletion = Gcep.ResidentCourseTrackerLbl.Text;

            string[] courseword3 = CourseTrackerAfterTestCompletion.Split(' ');
            int      CountOfCompletedRegCourseafterPassingTest = Convert.ToInt16(courseword3[2]);

            //int some = CountofcoursesOnResidentGcepaftercourseAssigmentCompleted + 1;
            //Assert.True(CountofcoursesOnResidentGcepaftercourseAssigmentCompleted + 1 == (CountOfCompletedRegCourseafterPassingTest));
            Gcep.ClickToAdvance(Gcep.SignOutLnk);

            Thread.Sleep(2500);
            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser(role.Username, role.Password);//10021375,10021377,21387
            Gcep = ED.ClickToAdvance(ED.GcepLnk);

            InstitutionsPage     Instute = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);
            InstitutionsGCEPPage InsGcep = Instute.SearchforInstitutions("Ellis Hospital");

            ProgramsPage Program = InsGcep.ClickToAdvance(InsGcep.InstitutionProgramManagmentLnk);

            Program.UnassignCurriculum();

            CurriculumMngPage Curriculum = InsGcep.ClickToAdvance(InsGcep.InstitutionCurriculumTmpLnk);

            Curriculum.Search("Learning111!!!");
            Curriculum.DeleteCurriculum("Learning111!!!");
        }
Ejemplo n.º 3
0
        public void Resident_Pass_Test(string InstitutionName, string CurriculumName)
        {
            UserInfo            role = UserUtils.GetUser(UserRole.Ama_Staff);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser(role.Username, role.Password);

            ///  2.click to GCEP link  navigate to Gcep page and waiting load icon disappear
            GCEPPage Gcep = ED.ClickToAdvance(ED.GcepLnk);

            ///  3.from Gcep navigating to institution managment searching for institution looking for curriculum and if their any curriculum with the same name deleting and starting create new curriculum.
            InstitutionsPage     Instute = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);
            InstitutionsGCEPPage InsGcep = Instute.SearchforInstitutions(InstitutionName);

            ProgramsPage Program = InsGcep.ClickToAdvance(InsGcep.InstitutionProgramManagmentLnk);

            Program.UnassignCurriculum();

            CurriculumMngPage Curriculum = InsGcep.ClickToAdvance(InsGcep.InstitutionCurriculumTmpLnk);

            Curriculum.Search(CurriculumName);
            Curriculum.DeleteCurriculum(CurriculumName);
            CurriculumCoursePage CurCoursPage = Curriculum.ClickToAdvance(Curriculum.CreateCurriculumTemplateBtn);

            ///  4.Form course page choosing available courses from table by index
            CurCoursPage.AddOrRemoveCourses(CurCoursPage.AvailableCoursesTbl, CurCoursPage.AddSelectedBtn, 1, 4, 5);

            // List<string> CourseNames = new List<string>();
            List <string> CourseNames = CurCoursPage.GetTheNamesChoosenCourses();

            ///  5. Giving the name for curriculum passing parameter from TestCase as a string
            CurCoursPage.CurriculumNameTxt.Clear();
            CurCoursPage.CurriculumNameTxt.SendKeys(CurriculumName);

            ///  6.Saving curriculum and navigating to the pgy pages to assigne course to students
            PGYAssignmentPage PGY = CurCoursPage.ClickToAdvance(CurCoursPage.NextBtn);

            ///  7.Choosing student years to assign course by index for each course
            PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 1, 5);
            PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 2, 5);
            PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 3, 5);

            ///  8. Saving curriculum and navigating to curriculum management page again
            PGY.ClickToAdvance(PGY.SaveExitBtn);

            /// 9.Finding curriculum what we create and assigning to the programm
            Curriculum.Search(CurriculumName);
            Curriculum.Actioncell.Click();
            AssignProgramPage Assign = Curriculum.ClickToAdvance(Curriculum.AssignToProgrammLnk);

            ///  10.Choosing starting date and ending date for  program  and clicking next button
            string StartingDate = Assign.ChoosingStartDate();
            string EndingDate   = Assign.ChoosingEndDate(1, "MM/d/yyyy");

            Assign.AssignProgramm();
            AssignSummaryPage Summary = Assign.ClickToAdvance(Assign.NextBtn);

            ///  11.Verifying from Assign Summary page program is displayed
            Assert.IsTrue(Summary.CreatedProgramName.Displayed);
            Assert.AreEqual((Summary.CreatedProgramName.Text), CurriculumName);

            ///  12.Verifying Assing confirmation test page curriculum name and starting date and ending dates are there which we choose.
            AssignConfirmationPage Confirmation = Summary.ClickToAdvance(Summary.NextBtn);

            // Assert.IsTrue(Confirmation.Grid_CellTextFound(Confirmation.ProgramSummaryTbl, StartingDate + " - " + EndingDate));
            Thread.Sleep(0500);
            Confirmation.ConfirmBtn.Click();

            ///  13.Signing out and Signing in as a Resindent counting required courses from myRequiredCourses
            Curriculum.ClickToAdvance(Curriculum.SignOutLnk);
            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser("10021387", "password");//10021375,10021377,21387
            Gcep = ED.ClickToAdvance(ED.GcepLnk);
            Assert.True(Gcep.VerificationOfChoosenCoursesAssignedForResident(browser, CourseNames), "Course count are not equal");
            CourseTestPage Course = Gcep.ResidentStartCourseOrContinue(browser, CourseNames[1]);

            Gcep = Course.TestPass();
            Assert.IsTrue(Gcep.VerificationCourseCompletion(browser, CourseNames[1], "View Certificate"), "View Certificet button not visible");
        }
Ejemplo n.º 4
0
        public void Resident_GCEP_SortBy_Duration()
        {
            ///  1.Navigate to the login page login as
            LoginPage           LP = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED = LP.LoginAsUser("10031194", "password");

            ///  2.click to GCEP link  navigate to Gcep page and waiting load icon disappear
            GCEPPage Gcep = ED.ClickToAdvance(ED.GcepLnk);

            ///  3. Waiting to course tracker dislay and gennting count of courses if there is not any course assigned assign courses
            Browser.WaitForElement(Bys.GCEPPage.ResidentCourseTrackerLbl, TimeSpan.FromSeconds(120), ElementCriteria.IsVisible);
            string CourseTracker = Gcep.ResidentCourseTrackerLbl.Text;

            ///  4.Clicking to Sort By duration button and wait to page reload.
            Gcep.ResidentGCEPSortBYDurationBtn.Click();
            Gcep.WaitForInitialize();

            if (CourseTracker.Contains("0"))
            {
                Gcep.ClickToAdvance(Gcep.SignOutLnk);
                LP   = Navigation.GoToLoginPage(browser);
                ED   = LP.LoginAsUser("10031315", "password");
                Gcep = ED.ClickToAdvance(ED.GcepLnk);
                ///  3.from Gcep navigating to institution managment searching for institution looking for curriculum and if their any curriculum with the same name deleting and starting create new curriculum.
                InstitutionsPage     Instute = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);
                InstitutionsGCEPPage InsGcep = Instute.SearchforInstitutions("");

                ProgramsPage Program = InsGcep.ClickToAdvance(InsGcep.InstitutionProgramManagmentLnk);
                Program.UnassignCurriculum();

                CurriculumMngPage Curriculum = InsGcep.ClickToAdvance(InsGcep.InstitutionCurriculumTmpLnk);
                Curriculum.Search("");
                Curriculum.DeleteCurriculum("");
                CurriculumCoursePage CurCoursPage = Curriculum.ClickToAdvance(Curriculum.CreateCurriculumTemplateBtn);

                ///  4.Form course page choosing available courses from table by index
                CurCoursPage.AddOrRemoveCourses(CurCoursPage.AvailableCoursesTbl, CurCoursPage.AddSelectedBtn, 1, 8, 9);

                // List<string> CourseNames = new List<string>();
                List <string> CourseNames = CurCoursPage.GetTheNamesChoosenCourses();

                ///  5. Giving the name for curriculum passing parameter from TestCase as a string
                CurCoursPage.CurriculumNameTxt.Clear();
                CurCoursPage.CurriculumNameTxt.SendKeys("");

                ///  6.Saving curriculum and navigating to the pgy pages to assigne course to students
                PGYAssignmentPage PGY = CurCoursPage.ClickToAdvance(CurCoursPage.NextBtn);

                ///  7.Choosing student years to assign course by index for each course
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 1, 5);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 2, 5);
                PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 3, 5);

                ///  8. Saving curriculum and navigating to curriculum management page again
                PGY.ClickToAdvance(PGY.SaveExitBtn);

                /// 9.Finding curriculum what we create and assigning to the programm
                Curriculum.Search("");
                Curriculum.Actioncell.Click();
                AssignProgramPage Assign = Curriculum.ClickToAdvance(Curriculum.AssignToProgrammLnk);

                ///  10.Choosing starting date and ending date for  program  and clicking next button
                string StartingDate = Assign.ChoosingStartDate();
                string EndingDate   = Assign.ChoosingEndDate(1, "MM/d/yyyy");
                Assign.AssignProgramm();
                AssignSummaryPage Summary = Assign.ClickToAdvance(Assign.NextBtn);

                ///  11.Verifying from Assign Summary page program is displayed
                Assert.IsTrue(Summary.CreatedProgramName.Displayed);
                Assert.AreEqual((Summary.CreatedProgramName.Text), "");

                ///  12.Verifying Assing confirmation test page curriculum name and starting date and ending dates are there which we choose.
                AssignConfirmationPage Confirmation = Summary.ClickToAdvance(Summary.NextBtn);
                // Assert.IsTrue(Confirmation.Grid_CellTextFound(Confirmation.ProgramSummaryTbl, StartingDate + " - " + EndingDate));
                Thread.Sleep(0500);
                Confirmation.ConfirmBtn.Click();
                ///  13.Signing out and Signing in as a Resindent counting required courses from myRequiredCourses
                Curriculum.ClickToAdvance(Curriculum.SignOutLnk);
                LP   = Navigation.GoToLoginPage(browser);
                ED   = LP.LoginAsUser("10021377", "password"); //10021375,10021377,21387
                Gcep = ED.ClickToAdvance(ED.GcepLnk);          //31224
            }

            ///  5.Scrolling down to get all informartion about courses and verify that exploer elective course link displayed.
            do
            {
                ElemSet.ScrollToElement(browser, Gcep.FaceBookLnk); Thread.Sleep(1000);
            }while (!Gcep.ResidentGcepShowElectiveCourseLnk.Displayed); //while (j< countofCourse);
            Assert.True(Gcep.ResidentGcepShowElectiveCourseLnk.Displayed);

            ///  6.Getting all duration for courses and verifying its in ascending order
            Assert.True(Gcep.ResidentCourseCompareDuration());
        }
Ejemplo n.º 5
0
        public void Assignment_Flow()
        {
            string InstitutionName = "Ellis Hospital";
            string CurriculumName  = "CurriculumName1!";

            /// 1.Navigate to the login page login as a Manager
            UserInfo            role = UserUtils.GetUser(UserRole.Ama_Staff);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser(role.Username, role.Password);

            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, ElementCriteria.IsEnabled);
            }
            ///  2.click to GCEP link  navigate to Gcep page and waiting load icon disappear
            GCEPPage Gcep = ED.ClickToAdvance(ED.GcepLnk);

            ///  3.from Gcep navigating to institution managment searching for institution looking for curriculum and if their any curriculum with the same name deleting and starting create new curriculum.
            InstitutionsPage     Instute    = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);
            InstitutionsGCEPPage InsGcep    = Instute.SearchforInstitutions(InstitutionName);
            CurriculumMngPage    Curriculum = InsGcep.ClickToAdvance(InsGcep.InstitutionCurriculumTmpLnk);

            Curriculum.Search(CurriculumName);
            Curriculum.DeleteCurriculum(CurriculumName);
            CurriculumCoursePage CurCoursPage = Curriculum.ClickToAdvance(Curriculum.CreateCurriculumTemplateBtn);

            ///  4.Form course page choosing available courses from table by index
            CurCoursPage.AddOrRemoveCourses(CurCoursPage.AvailableCoursesTbl, CurCoursPage.AddSelectedBtn, 1, 7, 12);

            ///  5. Giving the name for curriculum passing parameter from TestCase as a string
            CurCoursPage.CurriculumNameTxt.Clear();
            CurCoursPage.CurriculumNameTxt.SendKeys(CurriculumName);

            ///  6.Saving curriculum and navigating to the pgy pages to assigne course to students
            PGYAssignmentPage PGY = CurCoursPage.ClickToAdvance(CurCoursPage.NextBtn);

            ///  7.Choosing student years to assign course by index for each course
            PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 1, 4);
            PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 2, 5);
            PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 3, 5);

            ///  8. Saving curriculum and navigating to curriculum management page again
            PGY.ClickToAdvance(PGY.SaveExitBtn);

            /// 9.Finding curriculum what we create and assigning to the programm
            Curriculum.Search(CurriculumName);
            Curriculum.Actioncell.Click();
            AssignProgramPage Assign = Curriculum.ClickToAdvance(Curriculum.AssignToProgrammLnk);

            ///  10.Choosing starting date and ending date for  program  and clicking next button
            string StartingDate = Assign.ChoosingStartDate();
            string EndingDate   = Assign.ChoosingEndDate(1, "M/d/yyyy");

            Assign.AssignProgramm();
            AssignSummaryPage Summary = Assign.ClickToAdvance(Assign.NextBtn);

            ///  11.Verifying from Assign Summary page program is displayed
            Assert.IsTrue(Summary.CreatedProgramName.Displayed, "The curriculum name was not displayed");
            Assert.AreEqual(CurriculumName, Summary.CreatedProgramName.Text, string.Format("The expected curriculum name {0} is not equal to the actual name {1}", Summary.CreatedProgramName.Text, CurriculumName));

            ///  12.Verifying Assing confirmation test page curriculum name and starting date and ending dates are there which we choose.
            AssignConfirmationPage Confirmation = Summary.ClickToAdvance(Summary.NextBtn);

            Assert.IsTrue(Confirmation.Grid_CellTextFound(Confirmation.ProgramSummaryTbl, StartingDate + " - " + EndingDate));
            Confirmation.ConfirmBtn.Click();

            ///  13.Signing out and Signing in as a Resindent counting required courses from myRequiredCourses
            Curriculum.ClickToAdvance(Curriculum.SignOutLnk);
            LP = Navigation.GoToLoginPage(browser);
            ED = LP.LoginAsUser("10021387", "password");
            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, ElementCriteria.IsEnabled);
            }
            Gcep = ED.ClickToAdvance(ED.GcepLnk);
            // int startingCountCourse = Gcep.GetCountOfCourses(Gcep.MyRegiuredCourseTbl, Gcep.MyRequiredCourseLnk);
            //Gcep.MyRequiredCourseLnk.SendKeys(Keys.Tab);
            //Gcep.MyRequiredCourseLnk.Click();
            //Thread.Sleep(0500);
            int startingCountCourse = Gcep.Grid_GetRowCount(Gcep.ResidentCourseTbl);

            ///  14.Signing out and Signing in as Admin or AMA_Staff lookingfor programm what we created and Unassigning
            Curriculum.ClickToAdvance(Curriculum.SignOutLnk);
            LP = Navigation.GoToLoginPage(browser);
            ED = LP.LoginAsUser(role.Username, role.Password);
            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, ElementCriteria.IsEnabled);
            }
            Gcep = ED.ClickToAdvance(ED.GcepLnk);
            Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);
            Instute.SearchforInstitutions(InstitutionName);
            ProgramsPage Program = InsGcep.ClickToAdvance(InsGcep.InstitutionProgramManagmentLnk);

            Program.UnassignCurriculum();
            Gcep.ClickToAdvance(Gcep.SignOutLnk);
            // Curriculum.ClickToAdvance(Curriculum.SignOutLnk);

            ///  15.Signing out and Signing in as a Resindent counting required courses from myRequiredCourses
            LP = Navigation.GoToLoginPage(browser);
            ED = LP.LoginAsUser("10021387", "password");
            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, ElementCriteria.IsEnabled);
            }
            Gcep = ED.ClickToAdvance(ED.GcepLnk);
            int finalCountCourse = Gcep.Grid_GetRowCount(Gcep.ResidentCourseTbl);

            //int finalCountCourse = Gcep.GetCountOfCourses(Gcep.MyRegiuredCourseTbl, Gcep.MyRequiredCourseLnk);

            ///  16.Verifiying that starting count does not match with final count courses after unassigning
            Assert.IsFalse(startingCountCourse == finalCountCourse, "Course count are equal");
        }
Ejemplo n.º 6
0
        public void DashboardNotification_AdminView_ManagerView()
        {
            string notificationNameforAdmin = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                notificationNameforAdmin = "ChromeNotification";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                notificationNameforAdmin = "FireFoxNotificaton";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                notificationNameforAdmin = "IENotification";
            }

            ///  1.Navigate to the login page with valid credentials below
            UserInfo            role = UserUtils.GetUser(UserRole.Ama_Staff);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser(role.Username, role.Password);

            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, ElementCriteria.IsEnabled);
            }

            ///  2.click to CGEP link and waiting load icon disappear and initializing page.
            GCEPPage GCEP = ED.ClickToAdvance(ED.GcepLnk);

            ///  3.From CGEPPage clicking Dashboard Notification Management link
            if (BrowserName == BrowserNames.Chrome)
            {
                Browser.WaitForElement(Bys.GCEPPage.UserManageLnk, ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
            }
            DashboardNotificationsPage DNP = GCEP.ClickToAdvance(GCEP.DashboardNotificationManageLnk);

            ///  4.On Dashboard notification page searching notification with the same name what we are planning to create if its exist delete and after that,
            ///  clicking create notification button and navigating NotificationCreate page
            DNP.Search(notificationNameforAdmin);
            DNP.DeleteNotification();
            NotificationCreatorPage NCP = DNP.ClickToAdvance(DNP.CreateNotificationBtn);

            ///  5.Creating notification for Admin and Manager with the different name based on browser.
            NCP.NotificationNameTxt.SendKeys(notificationNameforAdmin);
            AssignProgramPage PP = new AssignProgramPage(Browser);

            PP.ChoosingStartDate();
            PP.ChoosingEndDate(1, "MM/dd/yyyy");

            NCP.AdminsRdo.Click();

            string notificationTitleAdmin = NCP.CreateRandomString(12);

            NCP.NotificatioTitleTxt.SendKeys(notificationTitleAdmin);

            NCP.NotificationBodyTxt.SendKeys(NCP.CreateRandomString(38));
            DNP = NCP.ClickToAdvance(NCP.SaveExitBtn);

            string notificationNameforManager = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                notificationNameforManager = "ChromeNotificationManager";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                notificationNameforManager = "FireFoxNotificatonManager";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                notificationNameforManager = "IENotificationManager";
            }


            GCEP = DNP.ClickToAdvance(DNP.GMECompetencyEducationProgramLnk);

            DNP = GCEP.ClickToAdvance(GCEP.DashboardNotificationManageLnk);

            DNP.Search(notificationNameforManager);
            DNP.DeleteNotification();

            NCP = DNP.ClickToAdvance(DNP.CreateNotificationBtn);

            NCP.NotificationNameTxt.SendKeys(notificationNameforManager);

            PP = new AssignProgramPage(Browser);
            PP.ChoosingStartDate();
            PP.ChoosingEndDate(1, "MM/dd/yyyy");

            NCP.ManagersRdo.Click();

            string notificationTitleManager = NCP.CreateRandomString(12);

            NCP.NotificatioTitleTxt.SendKeys(notificationTitleAdmin);

            NCP.NotificationBodyTxt.SendKeys(NCP.CreateRandomString(38));
            DNP = NCP.ClickToAdvance(NCP.SaveExitBtn);

            ///  6.Navigating Institutions Page
            GCEP = DNP.ClickToAdvance(DNP.GMECompetencyEducationProgramLnk);
            InstitutionsPage INS = GCEP.ClickToAdvance(GCEP.InstitutionManagLnk);

            ///  7.Searching for institution and navigating Institution GCEP.
            InstitutionsGCEPPage INSGCEP = INS.SearchforInstitutions("Arrowhead Regional Medical Center");

            if (BrowserName == BrowserNames.InternetExplorer)
            {
                Browser.WaitForElement(Bys.AMAPage.GCEPNotificationsBtn, TimeSpan.FromSeconds(90), ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
                //Thread.Sleep(5000);
            }

            ///  8.If notofications are displayed verify our last created is displayed with (title name is verification) if not displayed click notifications chevron and verify notification is there.
            if (!INSGCEP.NotificationTitlesLbl.Displayed)
            {
                INSGCEP.GCEPNotificationsBtn.Click();
            }
            Assert.True(INSGCEP.VerifyNotificationTitle(INSGCEP.NotificationTitlesLbl, notificationTitleAdmin));

            ///  9.From Institution GCEP Page navigating Program management page searching for program and navigating program manager GCEP page.
            ProgramsPage ProgP = INSGCEP.ClickToAdvance(INSGCEP.InstitutionProgramManagmentLnk);

            ProgP.SearchforProgram("ARMC Faculty");

            ///  10.If notofications are displayed verify our last created is displayed with (title name is verification) if not displayed click notifications chevron and verify notification is there
            if (!GCEP.NotificationTitlesLbl.Displayed)
            {
                GCEP.GCEPNotificationsBtn.Click();
            }
            Assert.True(INSGCEP.VerifyNotificationTitle(INSGCEP.NotificationTitlesLbl, notificationTitleAdmin));

            ///  11.navigating GCEP page Clicking dashboard notification links.
            GCEP.GMECompetencyEducationProgramLnk.Click();
            GCEP.WaitForInitialize();
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                Browser.WaitForElement(Bys.GCEPPage.DashboardNotificationManageLnk, TimeSpan.FromSeconds(90), ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
            }
            ///  12.Entering dashboard notification page searching for notifications created above and deleting them.
            DNP = GCEP.ClickToAdvance(GCEP.DashboardNotificationManageLnk);
            DNP.Search(notificationNameforAdmin);
            DNP.DeleteNotification();
        }
Ejemplo n.º 7
0
        public void DashboardNotification()
        {
            string notificationName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                notificationName = "ChromeNoteName";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                notificationName = "FireFoxNoteName";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                notificationName = "IENoteName";
            }

            ///  1.Navigate to the login page with valid credentials below
            UserInfo            role = UserUtils.GetUser(UserRole.Ama_Staff);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser(role.Username, role.Password);

            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.WaitForElement(Bys.EducationCenterPage.GcepLnk, ElementCriteria.IsEnabled);
            }
            ///  2.click to CGEP link and waiting load icon disappear
            GCEPPage GCEP = ED.ClickToAdvance(ED.GcepLnk);

            // Assert.False(GCEP.DashBoardDirectiveLbl.Displayed);
            // string NotificationText = GCEP.DashBoardDirectiveLbl.Text;


            ///  3.From CGEPPage clicking Dashboard Notification Management link
            if (BrowserName == BrowserNames.Chrome)
            {
                Browser.WaitForElement(Bys.GCEPPage.UserManageLnk, ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
            }
            DashboardNotificationsPage DNP = GCEP.ClickToAdvance(GCEP.DashboardNotificationManageLnk);

            ///  4.On Dashboard notification page searching notification with the same name what we are planning to create if its exist delete and after that,
            ///  clicking create notification button and navigating NotificationCreate page
            DNP.Search(notificationName);
            DNP.DeleteNotification();
            NotificationCreatorPage NCP = DNP.ClickToAdvance(DNP.CreateNotificationBtn);

            ///  5.Creating notification each browser will create unique notification and for 3 diffeerent role
            NCP.NotificationNameTxt.SendKeys(notificationName);
            AssignProgramPage PP = new AssignProgramPage(Browser);

            PP.ChoosingStartDate();
            PP.ChoosingEndDate(1, "MM/dd/yyyy");
            if (BrowserName == BrowserNames.Chrome)
            {
                NCP.AdminsRdo.Click();
            }
            else if (BrowserName == BrowserNames.InternetExplorer)
            {
                NCP.ResidentsRdo.Click();                                   // NCP.ManagersRdo.Click();
            }
            else
            {
                NCP.ManagersRdo.Click();                                    // NCP.ResidentsRdo.Click();
            }
            NCP.NotificatioTitleTxt.SendKeys(NCP.CreateRandomString(12));
            NCP.NotificationBodyTxt.SendKeys(NCP.CreateRandomString(38));
            DNP = NCP.ClickToAdvance(NCP.SaveExitBtn);

            ///  6.After creating notification signing out.
            DNP.ClickToAdvance(DNP.SignOutLnk);

            ///  7.Naviagting to login page signing in depends on the browser and since each browser create different notification each browser login with different role.
            LP = Navigation.GoToLoginPage(browser);
            if (BrowserName == BrowserNames.Chrome)
            {
                ED = LP.LoginAsUser("10031301", role.Password);//all notifications are here
            }
            else if (BrowserName == BrowserNames.InternetExplorer)
            {
                ED = LP.LoginAsUser("10021387", role.Password);       //10020462  10031037
            }
            else
            {
                ED = LP.LoginAsUser("10031037", role.Password);        //10021387
            }


            ///  8.Navigatin to GCEP page and verifying notification dashboard is displayed or notification container not empty.
            GCEP = ED.ClickToAdvance(ED.GcepLnk);
            // GCEP.WaitForInitialize();
            if (BrowserName == BrowserNames.Chrome)
            {
                Browser.WaitForElement(Bys.GCEPPage.UserManageLnk, TimeSpan.FromSeconds(60), ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
                Thread.Sleep(1500);
            }
            GCEP.GCEPNotificationsBtn.Click();
            Assert.True(GCEP.DashBoardDirectiveLbl.Displayed, "Dashboard Notification not displayed");
            IList <IWebElement> DashBoardNotificationContainer = GCEP.DashBoardDirectiveLbl.FindElements(By.XPath(".//li"));
            int ResidentDashboardNotificationCount             = DashBoardNotificationContainer.Count;

            Assert.True(DashBoardNotificationContainer.Count >= 1);

            ///  9.Sign out and login as a AMA_Staff navigating to GCEP page
            GCEP.ClickToAdvance(GCEP.SignOutLnk);
            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser(role.Username, role.Password);
            GCEP = ED.ClickToAdvance(ED.GcepLnk);

            ///  10.On GCEP Page clicking  Dashboard Notification Management link and navigating DashboardNotificationPage
            DNP = GCEP.ClickToAdvance(GCEP.DashboardNotificationManageLnk);

            ///  11.On DashboardNotificationPage searching for notification what we created and deleting notification and signing out
            DNP.Search(notificationName);
            DNP.DeleteNotification();
            DNP.ClickToAdvance(DNP.SignOutLnk);

            ///  12.Navigating login page and logging in depends on browser with different Role
            LP = Navigation.GoToLoginPage(browser);
            if (BrowserName == BrowserNames.Chrome)
            {
                ED = LP.LoginAsUser("10031301", role.Password);
            }
            else if (BrowserName == BrowserNames.InternetExplorer)
            {
                ED = LP.LoginAsUser("10021387", role.Password);                 //10031037
            }
            else
            {
                ED = LP.LoginAsUser("10031037", role.Password);                //10021387
            }


            ///  13.Navigating to GCEP page
            GCEP = ED.ClickToAdvance(ED.GcepLnk);
            //GCEP.WaitForInitialize();

            if (BrowserName == BrowserNames.Chrome)
            {
                Browser.WaitForElement(Bys.GCEPPage.UserManageLnk, TimeSpan.FromSeconds(60), ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
                Thread.Sleep(1500);
            }
            // Thread.Sleep(2000);
            ///  14.Verifying that notification is no more exist.
            if (GCEP.GCEPNotificationsBtn.Displayed)
            {
                if (!GCEP.NotificationTitlesLbl.Displayed)
                {
                    GCEP.GCEPNotificationsBtn.Click();
                }

                IList <IWebElement> DashBoardNotificationContainerFinal = GCEP.DashBoardDirectiveLbl.FindElements(By.XPath(".//li"));
                int ResidentDashboardNotificationCountFinal             = DashBoardNotificationContainerFinal.Count;

                Assert.True(ResidentDashboardNotificationCount > ResidentDashboardNotificationCountFinal);
            }
            else
            {
                Assert.True(true, "Dashboard notitfication was deleted not displaying any notofications");
            }
        }