public void CourseTracker_Resident_RequiredCourseFail()
        {
            ///  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);

            // Thread.Sleep(5000);
            string CourseTracker = Gcep.ResidentCourseTrackerLbl.Text;

            if (!CourseTracker.Contains("0"))
            {
                string[] CourseTrackernotNull = CourseTracker.Split(' ');
                //string[] countofcoursewasAssigned = CourseyrackernotNull[2].Split('/');
                //string[] courseword = CourseTracker.Split(' ');
                int regCoursCount = Convert.ToInt16(CourseTrackernotNull[2]);
                //Thread.Sleep(5000);
            }
            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     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!!!");
            CurriculumCoursePage CurCoursPage = Curriculum.ClickToAdvance(Curriculum.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);
        }
        public void MultyInstitution_HelpPageVerification()
        {
            ///  1.Navigate to the login page login as Admin with availability manage multy Institutions
            UserInfo            role = UserUtils.GetUser(UserRole.Ama_Staff);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser("10016185", "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.Saving all Institutions from drop down in list of strings and Sign Out
            List <string> institutions = ElemGet.SelElem_ListTextToListString(Gcep.InstitutionSelElem);

            Gcep.ClickToAdvance(Gcep.SignOutLnk);

            ///  4.Sign in again as Ama staff searching for all Institution what we saved on previous step.
            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser(role.Username, role.Password);
            Gcep = ED.ClickToAdvance(ED.GcepLnk);
            InstitutionsPage IP = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);

            ///  5.Getting contact emails for each institution saving them and Sign out.
            List <string> institutionContactEmailAdress = new List <string>();

            institutionContactEmailAdress = HelperMethods.GetTheInstutionsEmail(Browser, institutions);

            ///  6.Login as Admin who manages multyple Institution choosing each Institution and comparing contact email adresses.
            // if(BrowserName == BrowserNames.InternetExplorer) { IP.HeaderMenuDropDown.SendKeys(Keys.Tab); }
            IP.HeaderMenuDropDown.Click();
            IP.SignOutLnk.Click();
            Thread.Sleep(2000);
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                Thread.Sleep(2000);
            }
            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser("10016185", "password");
            Gcep = ED.ClickToAdvance(ED.GcepLnk);
            HelpPage HP = Gcep.ClickToAdvance(Gcep.HelpfromYourInstitutionLnk);

            // HelpPage HP = Gcep.ClickToAdvance(Gcep.HelpLnk);

            ///  7.Verifiying emails are correct on help page for each Institution.
            //Assert.True(HP.AdministrationLnk.Displayed);
            //Assert.True(HP.AdminWatchVideoLnk.Displayed);
            Assert.IsTrue(HelperMethods.ComparingInstitutionEmailsWithHelpContactEmails(Browser, institutions, institutionContactEmailAdress));
        }
        public void UsersCount(UserRole userRole)
        {
            ///  1.Navigate to the login page login as a Manager
            UserInfo            role = UserUtils.GetUser(userRole);
            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  navigate to Gcep page and waiting load icon disappear
            GCEPPage GCEP = ED.ClickToAdvance(ED.GcepLnk);

            if (userRole == UserRole.Manager)
            {
                Browser.WaitForElement(Bys.GCEPPage.SendEmailNotificationLnk, TimeSpan.FromSeconds(150), ElementCriteria.IsVisible);
            }

            ///  3.From GCEP page getting count of user from Users link and saving in Count of user integer then clicking user management link
            int             CountOfUserOnGCEP = Convert.ToInt32(GCEP.TotalUsersCountLnk.Text);
            GCEPUserMngPage GUMP = GCEP.ClickToAdvance(GCEP.UserManageLnk);

            ///  4.Getting count of user from user management label on user management page and verifying thatthey are equals.
            int CountOfUsersOnUserMngPage = GUMP.GetCountOfUsersFromUserManagementLabel();

            Assert.AreEqual(CountOfUserOnGCEP, CountOfUsersOnUserMngPage, "Counts of Users are not the same");
        }
Exemple #4
0
        public void Changing_CurriculumEndingDate()
        {
            string InstitutionName = "20170824_Institution";
            string ProgramName     = "Program 1";
            ///  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
            InstitutionsPage     Instute = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);
            InstitutionsGCEPPage InsGcep = Instute.SearchforInstitutions(InstitutionName);

            ///  4.From Institution Gcep Page going to Program Managment Page and searching for specific programm
            ProgramsPage Program = InsGcep.ClickToAdvance(InsGcep.InstitutionProgramManagmentLnk);

            Program.Search(ProgramName);

            ///  5.Clicking edit program and navigating to Curriculum Course Page
            Program.ChoosingFromDate();
            CurriculumCoursePage CoursePage = Program.EditProgramm();

            ///  6.From Curriculum course page setting end date calender today date minus 1 month and verifying warning message
            string todayDateMinus = CoursePage.SetEndDatForProgramm(-1);

            Assert.IsTrue(CoursePage.CurrentDateWarningLbl.Displayed);

            ///  7.setting end date calender today date plus 36 month and verifying warning message
            string todayDatePlus = CoursePage.SetEndDatForProgramm(24);

            Assert.IsTrue(CoursePage.GreaterDateWarningLbl.Displayed);
            //Program.Selectselect("ins-admin-grid-action cursor-default ng-scope", "Edit Curriculum");

            ///  8.setting end date calender today date plus 9 month and clicking next buttton
            string assignedDate = CoursePage.SetEndDatForProgramm(10);

            ///  9.Navigating PGYAssignment Page clicking next button
            PGYAssignmentPage PGyPages = CoursePage.ClickToAdvance(CoursePage.NextBtn);

            ///  10.Navigating Assign Summary Page verifying Program naem displayed and next button clicking
            AssignSummaryPage Summary = PGyPages.ClickToAdvance(PGyPages.NextBtn);

            Assert.IsTrue(Summary.CreatedProgramName.Displayed);

            ///  11.Navigating Assign Confirmation Page clicking edit confirmation button
            AssignConfirmationPage ConfirmationPage = Summary.ClickToAdvance(Summary.NextBtn);

            Program = ConfirmationPage.ClickToAdvance(ConfirmationPage.EditConfirmBtn);

            ///  12.Navigating Institution Program Page searching for program and  verifying date what we changed is there
            Program.Search(ProgramName);
            Assert.IsTrue(Program.GetValueOfRow(Program.ProgramMngTbl, assignedDate));
        }
Exemple #5
0
        public void CheckLoading()
        {
            Browser.Navigate().GoToUrl("https://cme.ama-assn.org/gme-competency/");
            IWebElement ProdUserNameTxt = Browser.FindElement(By.Id("go_username"));
            IWebElement ProdPasswordTxt = Browser.FindElement(By.Id("go_password"));
            IWebElement ProdLoginBtn    = Browser.FindElement(By.XPath("//input[@value='Sign In']"));

            ProdUserNameTxt.Clear();
            ProdUserNameTxt.SendKeys("jpenderville");
            ProdPasswordTxt.Clear();
            ProdPasswordTxt.SendKeys("password1");
            ProdLoginBtn.Click();
            GCEPPage GP = new GCEPPage(Browser);

            GP.WaitForInitialize();
            InstitutionsPage     IP      = GP.ClickToAdvance(GP.InstitutionManagLnk);
            InstitutionsGCEPPage InsGcep = IP.SearchforInstitutions("Beaumont Health System (SEMCME)");
            PromotePGYPage       ProPGY  = InsGcep.ClickToAdvance(InsGcep.InstitutionPromotePgyLnk);

            Thread.Sleep(8000);
            Assert.True(ProPGY.AvailableResidentsPromotePGYTblFirstRowChk.Displayed);
            //Thread.Sleep(3000);
            //Assert.False(ProPGY.AvailableResidentsPromotePGYTblFirstRowChk.Displayed);
            //Thread.Sleep(3000);
            //Assert.True(ProPGY.AvailableResidentsPromotePGYTblFirstRowChk.Displayed);
        }
        public void CreateCurriculumTemplate()

        {
            string curriculumName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                curriculumName = "Chrome1CurrName";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                curriculumName = "FireFox1CurrName";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                curriculumName = "IE1CurrName";
            }
            ///  1. Navigate to the login page login as a Manager or AMA staff
            UserInfo            role = UserUtils.GetUser(UserRole.Ama_Staff);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser(role.Username, role.Password);

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

            ///  3. From GCEP click to curriculum template Link and Navigate curriculum management page and choose create curriculum template button and redirect to curriculum course page.
            CurriculumMngPage    CurTemp      = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurriculumCoursePage CurCoursPage = CurTemp.ClickToAdvance(CurTemp.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, 8);
            PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 2, 7);
            PGY.Grid_ClickElementWithoutTextInsideRow(PGY.CourseTbl, 3, 6);

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

            ///  9.Searching for curriculum what we created verifying its there and deleting.
            CurTemp.Search(curriculumName);
            CurTemp.DeleteCurriculum(curriculumName);
            Assert.IsTrue(CurTemp.NoRecordLabel.Displayed);
            // Thread.Sleep(5000);
            //PGY.ClickOnCellsOfRow(1, 9);
            //PGY.ClickOnCellsOfRow(2, 6, 7, 10);
            //PGY.ClickOnCellsOfRow(3, 6, 7);
        }
        public void InstitutionManagement(UserRole userRole)
        {
            //test = report.CreateTest("Institution Management");

            ///  1. Navigate to the login page and login as a Admin
            UserInfo            role = UserUtils.GetUser(userRole);
            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.Clicking User Management link  and navigating to Institution Management Page
            InstitutionsPage Institutions = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);

            ///  4.From action gear clicking to mark inactive and verifiying alert is generated by checking button aviability.
            Institutions.Select("ins-admin-action-active", "Mark Inactive");
            Thread.Sleep(0500);
            Assert.IsTrue(Institutions.AcceptBtn.Displayed);
            Institutions.DismissBtn.Click();

            ///  5.Searching for specicfic user and checking edit user enabled by clicking and verifying url and navigating back by clicking cancel button
            Institutions.Select("ins-admin-action-active", "Edit Institution");
            Thread.Sleep(0500);
            Assert.IsTrue(Browser.Url.Contains("update"));
            // ElemSet.ScrollToElement(Browser, Institutions.CancelBtn);
            Institutions.CancelBtn.Click();
            Institutions.WaitForInitialize();

            //test.Log(Status.Pass, "");
            //report.Flush();

            ///  6.From action gear clicking to create program and verifiying url is changed.
            Institutions.Select("ins-admin-action-active", "Create Program");
            Thread.Sleep(0500);
            Assert.IsTrue(Browser.Url.Contains("programs/add"));
            Institutions.CancelBtn.Click();

            //test.Log(Status.Pass, "");
            //report.Flush();
            //test.Log(Status.Fail, "");
            //report.Flush();
        }
Exemple #8
0
        public void UserManagement()
        {
            ///  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);

            ///  3.From CGEPPage clicking UsermngLnk
            if (BrowserName == BrowserNames.Chrome)
            {
                Browser.WaitForElement(Bys.GCEPPage.UserManageLnk, ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
            }
            GCEPUserMngPage UserManagePage = GCEP.ClickToAdvance(GCEP.UserManageLnk);


            ///  4.verifying Inactive user with below credentials
            UserManagePage.SearchForUserByStatusAndName("Inactive", "Emily");
            if (BrowserName == BrowserNames.Chrome)
            {
                Thread.Sleep(5000);
            }
            Assert.True(UserManagePage.Grid_CellTextFoundAMATest(UserManagePage.UsersManagementTbl, "Inactive"), "text on the grid is not what we expected");

            ///  5.verifying Active user with below credentials
            UserManagePage.SearchForUserByStatusAndName("Active", "Hamza");
            Assert.True(UserManagePage.Grid_CellTextFoundAMATest(UserManagePage.UsersManagementTbl, "Active"));

            /// 6.Verifying from User Management table that "Active" User ("Hamza") and with "Admin" Role Displayed
            UserManagePage.SearchForUserByRoleandStatusAndName("Admin", "Active", "Hamza");
            Assert.True(UserManagePage.Grid_CellTextFoundAMATest(UserManagePage.UsersManagementTbl, "Active"));

            ///  7.Verifying from User Management table that "Inactive" User ("Hamza") and with "Admin" Role is not Displayed
            UserManagePage.SearchForUserByRoleandStatusAndName("Admin", "Inactive", "Hamza");
            Assert.True(UserManagePage.NoRecorMatchLabel.Displayed, "No record Label is not displayed");
        }
Exemple #9
0
        public void TestHelp()
        {
            Browser.Navigate().GoToUrl("https://cme.ama-assn.org/gme-competency/");
            IWebElement ProdUserNameTxt = Browser.FindElement(By.Id("go_username"));
            IWebElement ProdPasswordTxt = Browser.FindElement(By.Id("go_password"));
            IWebElement ProdLoginBtn    = Browser.FindElement(By.XPath("//input[@value='Sign In']"));

            ProdUserNameTxt.Clear();
            ProdUserNameTxt.SendKeys("jpenderville");
            ProdPasswordTxt.Clear();
            ProdPasswordTxt.SendKeys("password1");
            ProdLoginBtn.Click();
            GCEPPage GP = new GCEPPage(Browser);

            GP.WaitForInitialize();
            HelpPage HP = GP.ClickToAdvance(GP.HelpLnk);

            Assert.IsTrue(HP.JAMALaunchResourceLnk.Displayed);
            Assert.IsTrue(HP.AMAMemberLaunchResourceLnk.Displayed);
            Assert.IsTrue(HP.ContactUsLbl.Displayed);
        }
        public void FilterEndedCurricula(string InstitutionName)
        {
            ///  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
            InstitutionsPage     Instute = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);
            InstitutionsGCEPPage InsGcep = Instute.SearchforInstitutions(InstitutionName);

            ///  4.From Institution Gcep Page going to Program Managment Page and searching for specific programm
            ProgramsPage Program = InsGcep.ClickToAdvance(InsGcep.InstitutionProgramManagmentLnk);

            ///  5.Verifying date on calender set in default today date minus 6 month and seting calendar for today date
            Program.VeryfiyingDates();
            // Assert.IsFalse(Program.GetValueOfRow(Program.ProgramMngTbl, actualDateOnCalender));

            ///  6.Verifying from program management table ending date bigger then today date.
            Assert.IsTrue(Program.DateIsBiggerOrEqualsThenCurrentDate());

            //List<string> rowDates = new List<string>(Browser.FindElements(By.XPath("//*[@id='gridProgramManagement']//div[@class='ng-isolate-scope']/div[7]//div")).S‌​elect(iw => iw.Text));

            //foreach (string date in rowDates)
            //{
            //    DateTime currentDate = DateTime.Now;
            //    DateTime rowDate = Convert.ToDateTime(date);
            //    Assert.True(AssertUtils.DateGreaterThan(currentDate, rowDate));
            //}
        }
        public void User_Management(UserRole userRole)
        {
            ///  1. Navigate to the login page and login as a Admin
            UserInfo            role = UserUtils.GetUser(userRole);
            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.Clicking User Management link  and navigating to User Management Page
            GCEPUserMngPage User = Gcep.ClickToAdvance(Gcep.UserManageLnk);

            ///  4.Searching for specicfic user and checking edit user enabled by clicking verifying url and navigating back by clicking cancel button
            User.SearchTxt.SendKeys("Aabo");
            Thread.Sleep(0500);
            User.Select("ins-admin-action-active", "Edit User");
            Thread.Sleep(0500);
            Assert.IsTrue(Browser.Url.Contains("users/manageuser"));
            User.CancelBtn.Click();

            ///  5.from action gear clicking to Send notification and verifying url and navigating back by clicking cancel button
            User.Select("ins-admin-action-active", "Send Notification");
            Thread.Sleep(0500);
            Assert.IsTrue(Browser.Url.Contains("users/sendnotification"));
            User.CancelSendBtn.Click();

            ///  6.from action gear clicking to mark inactive and verifiying alert is generated by checking button aviability.
            User.Select("ins-admin-action-active", "Mark Inactive");
            Thread.Sleep(0500);
            Assert.IsTrue(User.AcceptBtn.Displayed);
            User.DismissBtn.Click();
        }
        public void AssignmentAviability(string curriculumName, string curriculumName2)
        {
            ///  1.Navigate to the login page login as a Manager
            UserInfo            role = UserUtils.GetUser(UserRole.Manager);
            LoginPage           LP   = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED   = LP.LoginAsUser(role.Username, role.Password);

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

            Thread.Sleep(9000); //until performance issue will be fix
            ///  3. From GCEP 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.Verifying Assign program is Enabled and Editing option is not there
            CurTempPage.Actioncell.Click();
            var Actualvalue = CurTempPage.AssignToProgrammLnk.Text;

            Assert.IsTrue(CurTempPage.AssignToProgrammLnk.Enabled);
            Assert.AreNotEqual("Edit", Actualvalue);

            ///  5. Searching for second curriculum created by AMA
            CurTempPage.Search(curriculumName2);

            ///  6.Verifying Assign program is Enabled and Editing option is not there
            CurTempPage.Actioncell.Click();
            var ActualvalueSecond = CurTempPage.AssignToProgrammLnk.Text;

            Assert.IsTrue(CurTempPage.AssignToProgrammLnk.Enabled);
            Assert.AreNotEqual("Edit", ActualvalueSecond);

            // Assert.IsTrue(CurTempPage.AssignToProgrammLnk.Enabled);
            //  Assert.False(CurTempPage.Editcell.Displayed);
            //  Assert.False(CurTempPage.Deletecell.Displayed);
        }
        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();
        }
Exemple #14
0
        public void TestCount()
        {
            string InstitutionName = "Temple University Hospital";

            Browser.Navigate().GoToUrl("https://cme.ama-assn.org");
            IWebElement ProdUserNameTxt = Browser.FindElement(By.Id("go_username"));
            IWebElement ProdPasswordTxt = Browser.FindElement(By.Id("go_password"));
            IWebElement ProdLoginBtn    = Browser.FindElement(By.XPath("//input[@value='Sign In']"));

            ProdUserNameTxt.Clear();
            ProdUserNameTxt.SendKeys("jpenderville");
            ProdPasswordTxt.Clear();
            ProdPasswordTxt.SendKeys("password1");   //div[@role='gridcell' and @ng-if='row.entity.Users > 0']/a
            ProdLoginBtn.Click();
            EducationCenterPage ED = new EducationCenterPage(Browser);

            Browser.WaitForElement(Bys.EducationCenterPage.CourseTbl, ElementCriteria.IsEnabled, ElementCriteria.IsVisible);
            GCEPPage Gcep = ED.ClickToAdvance(ED.GcepLnk);

            int             countOfCurriculumsOnGcep = Convert.ToInt32(Gcep.TotalCurriculumTmtsCountLnk.Text);
            int             countOfTotalUsers        = Convert.ToInt32(Gcep.TotalUsersCountLnk.Text);
            GCEPUserMngPage GUMP = Gcep.ClickToAdvance(Gcep.UserManageLnk);
            int             CountOfUsersOnUserMngPage = GUMP.GetCountOfUsersFromUserManagementLabel();

            Assert.AreEqual(countOfTotalUsers, CountOfUsersOnUserMngPage, "Counts of Users are not the same");

            Gcep = GUMP.ClickToAdvance(GUMP.AdministrationLnk);
            CurriculumMngPage CMP = Gcep.ClickToAdvance(Gcep.CurriculumTemplatesLnk);
            int countofCurriculumTemplatesFromCurriculumTemplatesPage = CMP.GetCountOfCurriculumonTable("of", "items");

            Assert.AreEqual(countOfCurriculumsOnGcep, countofCurriculumTemplatesFromCurriculumTemplatesPage, "Count of Curriculum Templates are not equals on GCEP page with CurriculumMngPage");
            Gcep = CMP.ClickToAdvance(CMP.AdministrationLnk);
            InstitutionsPage IP = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);

            IP.Search(InstitutionName);
            string xPathVariableForUserCount         = string.Format("//*[text()='{0}']/../../../../div/div[3]", InstitutionName); //div[@role='gridcell' and contains (text(),'')]/a[@ng-if='row.entity.Users > 0']
            string xPathVariableForProgramCount      = string.Format("//*[text()='{0}']/../../../../div/div[4]", InstitutionName); //div[@role='gridcell' and contains (text(),'')]/a[@ng-if='row.entity.Programs > 0']
            int    usersCountFromInstitutionsPage    = Convert.ToInt32(Browser.FindElement(By.XPath(xPathVariableForUserCount)).Text);
            int    programsCountFromInstitutionsPage = Convert.ToInt32(Browser.FindElement(By.XPath(xPathVariableForProgramCount)).Text);

            InstitutionsGCEPPage IGP = IP.SearchforInstitutions(InstitutionName);
            int usersCountFromInstitutionsGCEPPage    = Convert.ToInt32(IGP.TotalUserCountLnk.Text);
            int programsCountFromInstitutionsGCEPPage = Convert.ToInt32(IGP.TotalProgramCountLnk.Text);

            // Assert.AreEqual(usersCountFromInstitutionsPage, usersCountFromInstitutionsGCEPPage, "Count of user are not equals  on Institutions table with InstitutionGCEP page");
            // Assert.AreEqual(programsCountFromInstitutionsPage, programsCountFromInstitutionsGCEPPage, "Count of programs are not equals on Institutions table with InstitutionGCEP page");

            ProgramsPage PP = IGP.ClickToAdvance(IGP.InstitutionProgramManagmentLnk);
            int          countsOfProgramsOnPP = PP.Grid_GetCountOfItemsOnTable("of", "items");

            // Assert.AreEqual(programsCountFromInstitutionsPage, countsOfProgramsOnPP);

            IGP  = PP.ClickToBreadCrumbContainerToReturnInsGCEP(InstitutionName);
            GUMP = IGP.ClickToAdvance(IGP.InstitutionUserManagementLnk);
            int CountOfUsersOnUserMngPageForIns = GUMP.GetCountOfUsersFromUserManagementLabel();

            //Assert.AreEqual(usersCountFromInstitutionsPage, CountOfUsersOnUserMngPageForIns);

            Assert.True(DataUtils.intsEqual(usersCountFromInstitutionsPage, usersCountFromInstitutionsGCEPPage, CountOfUsersOnUserMngPageForIns));
            Assert.True(DataUtils.intsEqual(countsOfProgramsOnPP, programsCountFromInstitutionsGCEPPage, programsCountFromInstitutionsPage));
            Thread.Sleep(5000);
        }
Exemple #15
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();
        }
Exemple #16
0
        public void Checking_AllCounts_FromGcep()
        {
            ///  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  navigate to Gcep page and waiting load icon disappear and getting count of curriculum templates
            GCEPPage GCEP = ED.ClickToAdvance(ED.GcepLnk);
            int      countOfCurriculumTemplatesFromGCEP = Convert.ToInt32(GCEP.TotalCurriculumTmtsCountLnk.Text);

            ///  3.From GCEP Navigate to Curriculum Template saving count of curriculum on the table and verifying counts of curriculum from GCEP are equals
            CurriculumMngPage CMP = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            int countofCurriculumTemplatesFromPage = CMP.GetCountOfCurriculumonTable("of", "items");

            //string something = CMP.CountTableItemLbl.Text;
            //something = new string(something.Where(x => char.IsDigit(x)).ToArray());
            Assert.AreEqual(countOfCurriculumTemplatesFromGCEP, countofCurriculumTemplatesFromPage);

            /// 4.Navigating back to GCEP
            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.Navigate().Back();
            }
            CMP.GMECompetencyEducationProgramLnk.Click();  //AdministrationLnk.Click();
            GCEP.WaitForInitialize();
            if (BrowserName == BrowserNames.Firefox)
            {
                Browser.WaitForElement(Bys.GCEPPage.InstitutionManagLnk, ElementCriteria.IsEnabled);
            }

            ///  5.from Gcep navigating to institution managment searching for institution
            InstitutionsPage     Instute = GCEP.ClickToAdvance(GCEP.InstitutionManagLnk);
            InstitutionsGCEPPage InsGcep = Instute.SearchforInstitutions("Albert Einstein Medical Center");

            ///  6.Saving counts of program,user,curriculum template from Institution GCEP
            int totalProgramCountonGCEP = Convert.ToInt32(InsGcep.TotalProgramCountLnk.Text);
            int totalUsersCountonGCEP   = Convert.ToInt32(InsGcep.TotalUserCountLnk.Text);
            int totalCurTempCountonGCEP = Convert.ToInt32(InsGcep.TotalCurriculumTemplatesCountLnk.Text);

            ///  7.Navigating Program Management Page and getting counts of Programs Page and comparing countsof program from Institution GCEP page.
            ProgramsPage PP = InsGcep.ClickToAdvance(InsGcep.InstitutionProgramManagmentLnk);
            int          countsOfProgramsOnPP = PP.Grid_GetCountOfItemsOnTable("of", "items");

            Assert.AreEqual(totalProgramCountonGCEP, countsOfProgramsOnPP);

            ///  8.Navigating to Institution GCEP Page
            InsGcep = PP.ClickToBreadCrumbContainerToReturnInsGCEP("Albert Einstein Medical Center");

            ///  9.From Instution GCEP clicking user management link and navigating GCEP User Management page getting counts of users from User Management table
            ///  verifying counts of users count are equals from Institution GCEP and Users Management Page.
            GCEPUserMngPage GUMP = InsGcep.ClickToAdvance(InsGcep.InstitutionUserManagementLnk);
            int             CountOfUsersOnUserMngPage = GUMP.GetCountOfUsersFromUserManagementLabel();

            Assert.AreEqual(totalUsersCountonGCEP, CountOfUsersOnUserMngPage);

            ///  10.Navigating to Institution GCEP Page
            InsGcep = GUMP.ClickToBreadCrumbContainerToReturnInsGCEP("Albert Einstein Medical Center");

            ///  11.From Institutiom GCEP clicking curriculum templates and navigating Curriculum Mng Page and getting count of curriculum templates and asserting
            ///  counts of curriculum template from Institution GCEP page are equals.
            CMP = InsGcep.ClickToAdvance(InsGcep.InstitutionCurriculumTmpLnk);
            int countOfCurTempFromCurrimMngPage = CMP.Grid_GetCountOfItemsOnTable("of", "items");

            Assert.AreEqual(totalCurTempCountonGCEP, countOfCurTempFromCurrimMngPage);
        }
        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!!!");
        }
Exemple #18
0
        public void Update_BulkCurriculum(UserRole userRole)
        {
            string InstitutionName = "Beaumont Health System";
            ///  1. Navigate to the login page and login as a Admin
            UserInfo            role = UserUtils.GetUser(userRole);
            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
            InstitutionsPage Instute = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);

            ///  4.from institution page searching for specific institution choosing and navigating InstitutionGcep page
            InstitutionsGCEPPage InsGcep = Instute.SearchforInstitutions(InstitutionName);

            ///  5.Clicking program managment link and navigating Programs page, setting calendar for today date
            ProgramsPage PM = InsGcep.ClickToAdvance(InsGcep.InstitutionProgramManagmentLnk);

            PM.ChoosingFromDate();

            ///  6.Searching for specific program and if count of course on program less then 3 adding corsess else searching for second program also saving count of courses in variable.
            PM.Search("Anesthesiology");
            int AnesPC1 = PM.GetCountOfCourse();

            if (AnesPC1 < 3)
            {
                HelperMethods.AddCourseToCurriculum(browser);
            }
            PM.Search("Cardiology - Electrophysiology");
            int CardioPC2 = PM.GetCountOfCourse();

            //Assert.True(AnesPC1 == CardioPC2, "Count of courses for curriculum are not the same");

            /// 7.Searching for first program and removing to courses from it.
            PM.Search("Anesthesiology");
            CurriculumCoursePage CoursePage = PM.EditProgramm();

            CoursePage.AddOrRemoveCourses(CoursePage.ChosenCoursesTbl, CoursePage.RemoveSelectedBtn, 1, 2);
            PGYAssignmentPage      Pgy     = CoursePage.ClickToAdvance(CoursePage.NextBtn);
            AssignSummaryPage      Summary = Pgy.ClickToAdvance(Pgy.NextBtn);
            AssignConfirmationPage Confirm = Summary.ClickToAdvance(Summary.NextBtn);

            PM = Confirm.ClickToAdvance(Confirm.EditConfirmBtn);

            ///  8.Saving count of course after removing courses.
            PM.Search("Anesthesiology");
            int AnesPC1AfterRemoving = PM.GetCountOfCourse();

            ///  9.Clicking copy edit link and navigating copy edit page
            // Assert.AreNotEqual(AnesPC1, AnesPC1AfterRemoving);
            CopyCurriculumEditsPage CCEP = PM.CopyEditsProgramm();
            string TimeFrame             = CCEP.TimeFrameLbl.Text;

            ///  10.Verifying the program name are the same what we are searched for
            Assert.True(CCEP.ProgramNameLbl.Text.Equals("Anesthesiology"));
            int ActualCountOfprogramsBeforeEdit = CCEP.AddOrRemovePrograms(CCEP.CopyEditProgramTbl, 1);

            ///  11.After clicking next and copying course to other program verifying time fram are the same and verifying that copy same count of program
            Confirm = CCEP.ClickToAdvance(CCEP.NextBtn);
            Assert.True(TimeFrame.Equals(Confirm.TimeFrameLbl.Text));
            int ExpectedCountOfProgramsAfterEdit = Confirm.GetCountOfPrograms();

            Assert.True(ActualCountOfprogramsBeforeEdit == ExpectedCountOfProgramsAfterEdit);
            if (BrowserName == BrowserNames.Firefox)
            {
                Thread.Sleep(0500);
            }
            ///  12.clicking confirmation button navigating to the program page
            PM = Confirm.ClickToAdvance(Confirm.ConfirmBtn);

            ///  13.searching for second program and asserting courses from first program copied.
            PM.Search("Cardiology - Electrophysiology");
            int CountOfCourses2AfterCopy = PM.GetCountOfCourse();

            Assert.True(AnesPC1AfterRemoving == CountOfCourses2AfterCopy, "Count of courses after copy not equal,most likely test running parallel");

            ///  14. adding courses again to the program where we removed and copying for second program.
            PM.Search("Anesthesiology");
            HelperMethods.AddCourseToCurriculum(browser);
            int CountOfCoursesAfterAdding = PM.GetCountOfCourse();

            Assert.AreEqual(AnesPC1, CountOfCoursesAfterAdding, "count of courses are not the same in Curriculum");

            CCEP = PM.CopyEditsProgramm();
            int ActualCountOfprograms1 = CCEP.AddOrRemovePrograms(CCEP.CopyEditProgramTbl, 1);

            Confirm = CCEP.ClickToAdvance(CCEP.NextBtn);
            Thread.Sleep(1000);
            PM = Confirm.ClickToAdvance(Confirm.ConfirmBtn);
        }
Exemple #19
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");
        }
        public void MultyProgram_CreatingCurriculum_Flow()
        {
            string curriculumName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                curriculumName = "Chrome3CurrName";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                curriculumName = "FireFox3CurrName";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                curriculumName = "IE3CurrName";
            }
            ///  1.Navigate to the login page login as a Manager
            UserInfo            role = UserUtils.GetUser(UserRole.Manager);
            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  navigate to Gcep page and waiting load icon disappear
            GCEPPage GCEP = ED.ClickToAdvance(ED.GcepLnk);

            Browser.WaitForElement(Bys.GCEPPage.ProgramSelElem, ElementCriteria.IsEnabled);

            /// 3.Verifiying breadcrump is the same as a Program name saving Program name
            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.ProgramSelElem));
            string ProgramName = GCEP.ReturnValueAfterSelectingProgram(1);   // GCEP.ReturnValueAfterSelectingFromDropDown(GCEP.ProgramSelElem, 1);

            ///  4.Clicking Curruculum template link creating curriculum searching for curriculum if its not exist then creating curriculum with name depending on browser name
            CurriculumMngPage CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);

            CurTemp.Search(curriculumName);
            if (Browser.FindElements(Bys.CurriculumMngPage.NoRecordLbl).Count > 0)
            {
                CurriculumCoursePage CurCoursPage = CurTemp.ClickToAdvance(CurTemp.CreateCurriculumTemplateBtn);
                HelperMethods.CurriculumCreationFlow(browser, curriculumName);
            }

            ///  5.Cliking to the the breadcrump with Program name and naviagting GCEP page
            GCEP = CurTemp.ClickToBreadCrumbContainerToReturnGcep(ProgramName);
            Browser.WaitForElement(Bys.GCEPPage.ProgramSelElem, ElementCriteria.IsEnabled);

            ///  6.Choosing second Program from  Dropdown and saving Institution name
            string secondProgramName = GCEP.ReturnValueAfterSelectingProgram(2);  //GCEP.ReturnValueAfterSelectingFromDropDown(GCEP.ProgramSelElem, 2);

            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.ProgramSelElem));
            Browser.WaitForElement(Bys.GCEPPage.CurriculumTemplatesLnk, ElementCriteria.IsEnabled); //delete after performance issue removed

            ///  7.Clicking Curruculum template link searching for curriculum what we create for first Program
            CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurTemp.Search(curriculumName);

            ///  8. Verifiying curriculum not displayed for different Program
            Assert.True(CurTemp.NoRecordLabel.Displayed);

            ///  9.Clicking breadcrump with second Program name and navigating to GCEP page
            GCEP = CurTemp.ClickToBreadCrumbContainerToReturnGcep(secondProgramName);

            Browser.WaitForElement(Bys.GCEPPage.ProgramSelElem, ElementCriteria.IsEnabled);

            ///  10.Verifiying breadcrump is the same as a Program name saving Program name for third Program
            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.ProgramSelElem));
            string thirdProgramName = GCEP.ReturnValueAfterSelectingProgram(3);                     //GCEP.ReturnValueAfterSelectingFromDropDown(GCEP.ProgramSelElem, 3);

            Browser.WaitForElement(Bys.GCEPPage.CurriculumTemplatesLnk, ElementCriteria.IsEnabled); //delete after performance issue removed

            ///  11.Clicking Curruculum template link searching for curriculum what we create for first Program
            CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurTemp.Search(curriculumName);

            ///  12. Verifiying curriculum not displayed for different Program
            Assert.True(CurTemp.NoRecordLabel.Displayed);

            ///  13.Clicking breadcrump with third Program name and navigating to GCEP page
            GCEP = CurTemp.ClickToBreadCrumbContainerToReturnGcep(thirdProgramName);
            Browser.WaitForElement(Bys.GCEPPage.ProgramSelElem, ElementCriteria.IsEnabled);

            ///  14. Choosing first Program from dropdown waiting for initialize page
            GCEP.ProgramSelElem.SelectByText(ProgramName);
            GCEP.WaitForInitialize();
            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.ProgramSelElem));

            Browser.WaitForElement(Bys.GCEPPage.CurriculumTemplatesLnk, ElementCriteria.IsEnabled);  //delete after performance issue removed

            ///  15.Clicking Curruculum template link searching for curriculum what we create for first Program
            CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurTemp.Search(curriculumName);

            ///  16.Deleting curriculum and verifying label is displayed
            CurTemp.DeleteCurriculum(curriculumName);
            Assert.IsTrue(CurTemp.NoRecordLabel.Displayed);
        }
        public void EditCurriculumTemplate()
        {
            string curriculumName       = "";
            string editedCurriculumName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                curriculumName       = "ChromeCurrName";
                editedCurriculumName = "ChromeCurrNameEdited";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                curriculumName       = "FFCurrName";
                editedCurriculumName = "FFCurrNameEdited";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                curriculumName       = "IECurrName";
                editedCurriculumName = "IECurrNameEdited";
            }

            // string curriculum,string newcurriculum
            //newCurrName = DataUtils.GetRandomString(16);
            //editedCurrName = DataUtils.GetRandomString(16);

            ///  1. Navigate to the login page and login as  AMA-staff("10031315","password")
            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 landing on curriculum management page
            GCEPPage GCEP = ED.ClickToAdvance(ED.GcepLnk);

            ///  3.on curriculum management page click curriculum templates link and landing  curriculum course page
            CurriculumMngPage CurTempPage = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);

            ///  4. on curriculum courses page  clicking create and choosing courses
            CurTempPage.Search(curriculumName);
            CurTempPage.DeleteCurriculum(curriculumName);
            CurriculumCoursePage CurCoursPage = CurTempPage.ClickToAdvance(CurTempPage.CreateCurriculumTemplateBtn);

            CurCoursPage.AddOrRemoveCourses(CurCoursPage.AvailableCoursesTbl, CurCoursPage.AddSelectedBtn, 1, 7, 12);

            ///  5.giving name for curriculum from Test cases parametr ("L2!")
            // string randomCurrName = DataUtils.GetRandomString(16);
            CurCoursPage.CurriculumNameTxt.Clear();
            CurCoursPage.CurriculumNameTxt.SendKeys(curriculumName);

            ///  6. saving curriculum navigating pgy page
            PGYAssignmentPage PGYpage = CurCoursPage.ClickToAdvance(CurCoursPage.NextBtn);


            ///  7.choosing pgy's and saving
            //  Assert.True(false);
            PGYpage.Grid_ClickElementWithoutTextInsideRow(PGYpage.CourseTbl, 1, 9);                                         // PGYpage.ClickOnCellsOfRow(1, 9);
            PGYpage.Grid_ClickElementWithoutTextInsideRow(PGYpage.CourseTbl, 2, 4);                                         //PGYpage.ClickOnCellsOfRow(2, 6, 7, 10);
            PGYpage.Grid_ClickElementWithoutTextInsideRow(PGYpage.CourseTbl, 3, 6);                                         //PGYpage.ClickOnCellsOfRow(3, 6, 7);

            ///  8.saving curruculum navigating curriculum MNG page
            CurTempPage = PGYpage.ClickToAdvance(PGYpage.SaveExitBtn);

            ///  9.curriculum management page searching for curriculum what we created and saving name and  row count choosing curriculum what we create and editing name and pgy years
            CurTempPage.Search(curriculumName);
            CurTempPage.CurriculumName.Click();
            var ActualCurriculumName  = CurTempPage.CurriculumName.Text;
            int ActualCurriculumCount = CurTempPage.GetCountofRow(CurTempPage.SpecificCurriculumTbl);

            CurTempPage.CurriculumWinClose.Click();
            CurTempPage.EditCurriculum(curriculumName);

            ///  10. Adding new course
            CurCoursPage.AddOrRemoveCourses(CurCoursPage.AvailableCoursesTbl, CurCoursPage.AddSelectedBtn, 10);

            ///  11. Renaming curriculum from ("L2!"), to ("L3!"),curriculum name passing from test case attribute
            CurCoursPage.CurriculumNameTxt.Clear();
            CurCoursPage.CurriculumNameTxt.SendKeys(editedCurriculumName);
            PGYpage = CurCoursPage.ClickToAdvance(CurCoursPage.NextBtn);

            ///  12. Choosing student years for new course what was added
            PGYpage.Grid_ClickElementWithoutTextInsideRow(PGYpage.CourseTbl, 3, 8);

            ///  13.Saving curriculum and navigating to curriculum management page again
            CurTempPage = PGYpage.ClickToAdvance(PGYpage.SaveExitBtn);

            ///  14. searching new created curriculum and saving info about it
            CurTempPage.Search(editedCurriculumName);
            CurTempPage.CurriculumName.Click();
            var FinalCurriculumName  = CurTempPage.CurriculumName.Text;
            int FinalCurriculumCount = CurTempPage.GetCountofRow(CurTempPage.SpecificCurriculumTbl);

            CurTempPage.CurriculumWinClose.Click();

            ///  15.comparing first curriculum and second curriculum after editing
            Assert.IsFalse(FinalCurriculumCount == ActualCurriculumCount && FinalCurriculumName == ActualCurriculumName);

            ///  16.deleting last curriculum what we created and edited
            CurTempPage.DeleteCurriculum(editedCurriculumName);
        }
Exemple #22
0
        public void HelpPageVerification()
        {
            ///  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(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.Navigate Institutions page choose Institutions get the contact email for it
            InstitutionsPage IP = Gcep.ClickToAdvance(Gcep.InstitutionManagLnk);

            IP.Search("Medical College of Wisconsin");
            IP.ActionGearBtn.Click();
            Thread.Sleep(0500);
            EditInstitutionPage EIP = IP.ClickToAdvance(IP.EditInstitutionLnk);

            string InstitutionContactEmailAdress = EIP.InstitutionPrimaryContactEmailTxt.GetAttribute("value");

            ///  4.Go to Help Page
            HelpPage HP = EIP.ClickToAdvance(EIP.HelpfromYourInstitutionLnk);   //(EIP.HelpLnk);

            ///  5.Verifying all Links are there for all roles
            Assert.IsTrue(HP.ResidentComingSoonLnk.Displayed);
            Assert.IsTrue(HP.ResidentLaunchResourceLnk.Displayed);
            Assert.IsTrue(HP.ManagerLaunchResourceLnk.Displayed);
            Assert.IsTrue(HP.AdminLaunchResourceLnk.Displayed);
            Assert.IsTrue(HP.AdminWatchVideoLnk.Displayed);
            Assert.IsTrue(HP.AMAMemberLaunchResourceLnk.Displayed);
            Assert.IsTrue(HP.AMAResidentLaunchResourceLnk.Displayed);
            Assert.IsTrue(HP.ContactUsLbl.Displayed);

            ///  6.Sign out
            HP.HeaderMenuDropDown.Click();
            HP.SignOutLnk.Click();
            Thread.Sleep(2000);

            ///  7.Log in as Manager for Institution we choose above
            LP   = Navigation.GoToLoginPage(Browser);
            ED   = LP.LoginAsUser("10031047", "password");
            Gcep = ED.ClickToAdvance(ED.GcepLnk);

            ///  8.Navigating to a Help Page
            HP = Gcep.ClickToAdvance(EIP.HelpfromYourInstitutionLnk);   //ClickToAdvance(Gcep.HelpLnk);

            ///  9.Verifying  help links for Manager displayed and contact email are there and sign out
            Assert.IsTrue(HP.ManagerLaunchResourceLnk.Displayed);
            string InstitutionContactEmailAdressManager = HP.ContactInvolvedInstitutionEmailLnk.Text;

            Assert.AreEqual(InstitutionContactEmailAdressManager, InstitutionContactEmailAdress);
            HP.HeaderMenuDropDown.Click();
            HP.SignOutLnk.Click();
            Thread.Sleep(2000);

            ///  10.Log in as a Admin navigating to GCEP
            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser("10031312", "password");
            Gcep = ED.ClickToAdvance(ED.GcepLnk);

            ///  11.Navigating to Help pag again
            HP = Gcep.ClickToAdvance(EIP.HelpfromYourInstitutionLnk);            //ClickToAdvance(Gcep.HelpLnk);

            ///  12.Verifying  help links for Admin displayed and contact email are there and sign out
            Assert.IsTrue(HP.AdminLaunchResourceLnk.Displayed);
            Assert.IsTrue(HP.AdminWatchVideoLnk.Displayed);
            string InstitutionContactEmailAdressAdmin = HP.ContactInvolvedInstitutionEmailLnk.Text;

            Assert.AreEqual(InstitutionContactEmailAdressAdmin, InstitutionContactEmailAdress);
            HP.HeaderMenuDropDown.Click();
            HP.SignOutLnk.Click();
            Thread.Sleep(2000);

            ///  13.Log in as a Resident navigating to GCEP
            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser("10031201", "password");
            Gcep = ED.ClickToAdvance(ED.GcepLnk);

            ///  14.Navigating to Help page again
            HP = Gcep.ClickToAdvance(EIP.HelpfromYourInstitutionLnk);     //ClickToAdvance(Gcep.HelpLnk);

            ///  15.Verifying  help links for Resident displayed and contact email are there.
            Assert.IsTrue(HP.ResidentComingSoonLnk.Displayed);
            Assert.IsTrue(HP.ResidentLaunchResourceLnk.Displayed);
            string InstitutionContactEmailAdressResident = HP.ContactInvolvedInstitutionEmailLnk.Text;

            Assert.AreEqual(InstitutionContactEmailAdressResident, InstitutionContactEmailAdress);
        }
Exemple #23
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());
        }
Exemple #24
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");
        }
        public void MultyInstitution_CreatingCurriculum()
        {
            string curriculumName = "";

            if (BrowserName == BrowserNames.Chrome)
            {
                curriculumName = "Chrome2CurrName";
            }
            if (BrowserName == BrowserNames.Firefox)
            {
                curriculumName = "FireFox2CurrName";
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                curriculumName = "IE2CurrName";
            }
            ///  1.Navigate to the login page login as a Admin witn below credentials
            LoginPage           LP = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED = LP.LoginAsUser("10016185", "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);

            Browser.WaitForElement(Bys.GCEPPage.InstitutionSelElem, ElementCriteria.IsEnabled);

            ///  3.Verifiying breadcrump is the same as a Institution name saving Institution name and count of users for Institution
            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.InstitutionSelElem));
            string InstitutionName           = GCEP.ReturnValueAfterSelectingInstitution(1);
            int    FirstInstitutionUserCount = Int32.Parse(GCEP.TotalUsersCountLnk.Text);

            Browser.WaitForElement(Bys.GCEPPage.UserManageLnk, TimeSpan.FromSeconds(90), ElementCriteria.IsEnabled, ElementCriteria.IsVisible);

            ///  4.Clicking Curruculum template link creating curriculum with name depending on browser name
            CurriculumMngPage CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);

            CurTemp.Search(curriculumName);
            if (Browser.FindElements(Bys.CurriculumMngPage.NoRecordLbl).Count > 0)
            {
                CurriculumCoursePage CurCoursPage = CurTemp.ClickToAdvance(CurTemp.CreateCurriculumTemplateBtn);
                HelperMethods.CurriculumCreationFlow(browser, curriculumName);
            }

            ///  5.Cliking to the the breadcrump with Institution name and naviagting GCEP page
            GCEP = CurTemp.ClickToBreadCrumbContainerToReturnGcep(InstitutionName);

            ///  6.Choosing second Institution from  Dropdown and saving Institution name and count of users for Institution
            string secondInstutionName        = GCEP.ReturnValueAfterSelectingInstitution(2);
            int    SecondInstitutionUserCount = Int32.Parse(GCEP.TotalUsersCountLnk.Text);

            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.InstitutionSelElem));

            ///  7.Clicking Curruculum template link searching for curriculum what we create for first Institution
            CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurTemp.Search(curriculumName);

            ///  8. Verifiying curriculum not displayed for different Institution
            Assert.True(CurTemp.NoRecordLabel.Displayed);

            ///  9.Clicking breadcrump with second Institution name and navigating to GCEP page
            GCEP = CurTemp.ClickToBreadCrumbContainerToReturnGcep(secondInstutionName);

            ///  10.Verifiying breadcrump is the same as a Institution name saving Institution name and count of users for third Institution
            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.InstitutionSelElem));
            string thirdInstitutionName      = GCEP.ReturnValueAfterSelectingInstitution(3);
            int    ThirdInstitutionUserCount = Int32.Parse(GCEP.TotalUsersCountLnk.Text);

            ///  11.Clicking Curruculum template link searching for curriculum what we create for first Institution
            CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurTemp.Search(curriculumName);

            ///  12.Verifiying curriculum not displayed for a different Institution
            Assert.True(CurTemp.NoRecordLabel.Displayed);

            ///  13.Clicking breadcrump with third Institution name and navigating to GCEP page
            GCEP = CurTemp.ClickToBreadCrumbContainerToReturnGcep(thirdInstitutionName);

            ///  14.Verifiying breadcrump is the same as a Institution name saving Institution name and count of users for fourth Institution
            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.InstitutionSelElem));
            string fourthInstitutionName      = GCEP.ReturnValueAfterSelectingInstitution(4);
            int    FourthInstitutionUserCount = Int32.Parse(GCEP.TotalUsersCountLnk.Text);

            ///  15.Clicking Curruculum template link searching for curriculum what we create for first Institution
            CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurTemp.Search(curriculumName);

            ///  16.Verifiying curriculum not displayed for a different Institution
            Assert.True(CurTemp.NoRecordLabel.Displayed);

            ///  17.Clicking breadcrump with fourth Institution name and navigating to GCEP page
            GCEP = CurTemp.ClickToBreadCrumbContainerToReturnGcep(fourthInstitutionName);

            ///  18.Verifiying breadcrump is the same as a Institution name saving Institution name and count of users for fifth Institution
            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.InstitutionSelElem));
            string fifthInstitutionName      = GCEP.ReturnValueAfterSelectingInstitution(5);
            int    FifthInstitutionUserCount = Int32.Parse(GCEP.TotalUsersCountLnk.Text);


            ///  19.Clicking Curruculum template link searching for curriculum what we create for first Institution
            CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurTemp.Search(curriculumName);

            ///  20.Verifiying curriculum not displayed for a different Institution
            Assert.True(CurTemp.NoRecordLabel.Displayed);


            ///  21.Clicking breadcrump with fifth Institution name and navigating to GCEP page
            GCEP = CurTemp.ClickToBreadCrumbContainerToReturnGcep(fifthInstitutionName);

            ///  22. Choosing first Institution waiting for initialize page
            GCEP.InstitutionSelElem.SelectByText(InstitutionName);
            GCEP.WaitForInitialize();

            ///  23.Clicking Curruculum template link searching for curriculum what we create for first Institution
            CurTemp = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            CurTemp.Search(curriculumName);

            ///  24. Deleting curriculum and verifying label is displayed
            CurTemp.DeleteCurriculum(curriculumName);
            Assert.IsTrue(CurTemp.NoRecordLabel.Displayed);

            ///  25.Verifying counts of user for each Institution not equal.
            Assert.False(DataUtils.intsEqual(FirstInstitutionUserCount, SecondInstitutionUserCount, ThirdInstitutionUserCount, FourthInstitutionUserCount, FifthInstitutionUserCount));
            //Assert.True(DataUtils.intsEqual(FirstInstitutionUserCount, FirstInstitutionUserCount, FirstInstitutionUserCount, FirstInstitutionUserCount));
            //Assert.False(DataUtils.intsEqual(FirstInstitutionUserCount, FirstInstitutionUserCount, FirstInstitutionUserCount, FirstInstitutionUserCount, SecondInstitutionUserCount));
            //Assert.False(DataUtils.intsEqual(FirstInstitutionUserCount));
            //Assert.True(DataUtils.intsEqual(FirstInstitutionUserCount, FirstInstitutionUserCount));
        }
        public void Manage_MultyProgram_CurriculumAssignmentFlow()
        {
            ///  1.Navigate to the login page login as a Manager
            UserInfo            role = UserUtils.GetUser(UserRole.Manager);
            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  navigate to Gcep page and waiting load icon disappear
            GCEPPage GCEP = ED.ClickToAdvance(ED.GcepLnk);

            Browser.WaitForElement(Bys.GCEPPage.ProgramSelElem, ElementCriteria.IsEnabled);

            ///  3.Verifiying breadcrump is the same as a Institution name saving Institution name and count of users for Institution
            Assert.True(GCEP.SelectProgramAndVerifyBreadcrump(GCEP.ProgramSelElem));
            string ProgramName           = GCEP.ReturnValueAfterSelectingProgram(1);// GCEP.ReturnValueAfterSelectingFromDropDown(GCEP.ProgramSelElem, 1);
            int    firstProgramUserCount = Int32.Parse(GCEP.TotalUsersCountLnk.Text);

            ///  4.Clicking Curruculum template link and getting breadcrump text and verifying with program name
            CurriculumMngPage CM = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            //  var value = Browser.FindElement(Bys.AMAPage.BreadCrump).Text;
            string expectedFromCM = CM.GetBreadCrumbContainerText();

            Assert.IsTrue(expectedFromCM.Contains(ProgramName.ToLower()));
            string breadCrumpAfterAssigment = HelperMethods.CurriculumAssignmentFlow(browser, "new1111");

            Assert.True(breadCrumpAfterAssigment.Contains(ProgramName.ToLower()));

            Thread.Sleep(2000);

            ///  5.Clicking to the the breadcrump with Program name and naviagting GCEP page
            GCEP = CM.ClickToBreadCrumbContainerToReturnGcep(ProgramName);

            Browser.WaitForElement(Bys.GCEPPage.ProgramSelElem, ElementCriteria.IsEnabled);

            ///  6.Choosing second Program from  Dropdown and saving Program name and count of users for program
            string secondProgramName      = GCEP.ReturnValueAfterSelectingProgram(2); //GCEP.ReturnValueAfterSelectingFromDropDown(GCEP.ProgramSelElem, 2);
            int    secondProgramUserCount = Int32.Parse(GCEP.TotalUsersCountLnk.Text);

            ///  7.Clicking Curruculum template link and getting breadcrump text for second Porgram and verifying with Program name
            CM = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            string secondexpectedFromCM = CM.GetBreadCrumbContainerText();

            Assert.IsTrue(secondexpectedFromCM.Contains(secondProgramName.ToLower()));
            string secondBreadcrumpAfterAssignment = HelperMethods.CurriculumAssignmentFlow(browser, "new1111");

            Assert.True(secondBreadcrumpAfterAssignment.Contains(secondProgramName.ToLower()));

            Thread.Sleep(2000);

            ///  8.Cliking to the the breadcrump with  second Program name and naviagting GCEP page  and getting breadcrump text for third Porgram
            GCEP = CM.ClickToBreadCrumbContainerToReturnGcep(secondProgramName);
            Browser.WaitForElement(Bys.GCEPPage.ProgramSelElem, ElementCriteria.IsEnabled);
            string thirdProgramName      = GCEP.ReturnValueAfterSelectingProgram(3); //GCEP.ReturnValueAfterSelectingFromDropDown(GCEP.ProgramSelElem, 3);
            int    thirdProgramUserCount = Int32.Parse(GCEP.TotalUsersCountLnk.Text);

            Thread.Sleep(2000);
            ///  9.Clicking Curruculum template link and verifying with third Program name
            CM = GCEP.ClickToAdvance(GCEP.CurriculumTemplatesLnk);
            string thirdexpectedFromCM = CM.GetBreadCrumbContainerText();

            Assert.IsTrue(thirdexpectedFromCM.Contains(thirdProgramName.ToLower()));
            string thirdBreadcrumpAfterAssignment = HelperMethods.CurriculumAssignmentFlow(browser, "new1111");

            Assert.True(thirdBreadcrumpAfterAssignment.Contains(thirdProgramName.ToLower()));

            Thread.Sleep(2000);

            GCEP = CM.ClickToBreadCrumbContainerToReturnGcep(thirdProgramName);
            Browser.WaitForElement(Bys.GCEPPage.ProgramSelElem, ElementCriteria.IsEnabled);

            ///  10.Verifying each program has different count of users.
            Assert.False(DataUtils.intsEqual(firstProgramUserCount, secondProgramUserCount, thirdProgramUserCount));
        }
        public void PromotePGY()
        {
            ///  1. Navigate to the login page and login as a Admin
            LoginPage           LP = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED = LP.LoginAsUser("10013616", "password");   //10004610

            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. Go to the promote pgy page and then add an availavle redisent to the selected list choosing different user for each browser.
            PromotePGYPage ProPGY = Gcep.ClickToAdvance(Gcep.PromotePGYLnk);

            if (BrowserName == BrowserNames.Firefox)
            {
                ProPGY.AddOrRemoveResidents(ProPGY.AvailableResidentsPromotePGYTbl, ProPGY.AddSelectedBtn, 1);
            }
            if (BrowserName == BrowserNames.Chrome)
            {
                ProPGY.AddOrRemoveResidents(ProPGY.AvailableResidentsPromotePGYTbl, ProPGY.AddSelectedBtn, 3);
            }
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                ProPGY.AddOrRemoveResidents(ProPGY.AvailableResidentsPromotePGYTbl, ProPGY.AddSelectedBtn, 2);
            }

            /// 4. Grab the year value from the select table, open the form, and then assert that the New Year
            /// element's value increased 1 year from the tables value
            int chosenResidentsTableYearValue = Convert.ToInt32(ProPGY.Grid_GetValueOfCell(ProPGY.ChoosenResidentsPromotePGYTbl));

            ///  5. Clicking promote button waiting to pop up appear getting name and new year what will be updated
            ProPGY.PromoteBtn.Click();
            Browser.WaitForElement(Bys.PromotePGYPage.FormConfirmBtn, TimeSpan.FromSeconds(180), ElementCriteria.IsVisible, ElementCriteria.IsEnabled);
            int    promotePGYFormNewYearValue = Convert.ToInt32(ProPGY.GetValueOfCell(ProPGY.FormResidentsDescriptionTbl, 2));
            string Resident_FullName          = ProPGY.GetValueOfCell(ProPGY.FormResidentsDescriptionTbl, 0);

            ///  6. Verifying  new year are equals year value from choosen resident increase 1 year and clicking confirmation button
            Assert.AreEqual(chosenResidentsTableYearValue + 1, promotePGYFormNewYearValue);
            Gcep = ProPGY.ClickToAdvance(ProPGY.FormConfirmBtn);

            ///  7. After confirmation  its getting Gcep page and clicking user managment link and searching for users by name what we promoted
            GCEPUserMngPage UMP = Gcep.ClickToAdvance(Gcep.UserManageLnk);

            // Extracting the first name from the resident to then search on first name
            var    Resident_FirstAndLastName = Resident_FullName.Split(',');
            string Resident_LastName         = Resident_FirstAndLastName[0];

            UMP.Search(Resident_LastName);

            //IWebElement UserLnk1 = browser.FindElement(By.LinkText(Resident_FullName));
            ///  8. Clicking on user and navigating User management page
            UserManagementPage UMPG = UMP.chooseUser(Resident_FullName);

            ///  9. Getting value as a year from user pgy and user name
            int    userManagementPageYearValue = Convert.ToInt32(UMPG.UserPgySelElem.SelectedOption.Text);
            string Resident_Fullname_Expected  = UMPG.UserNameTxt.GetAttribute("value");

            ///  10. Verifying user pgy year equals to promote new year value and the user name with last name are the same
            Assert.AreEqual(userManagementPageYearValue, promotePGYFormNewYearValue);
            Assert.AreEqual(Resident_FullName, Resident_Fullname_Expected, "Resident name from available promote pgy table are not the same with user management page");
        }
Exemple #28
0
        public void Resident_CourseListing_StartNow()
        {
            ///  1.Navigate to the login page login as
            LoginPage           LP = Navigation.GoToLoginPage(browser);
            EducationCenterPage ED = LP.LoginAsUser("10030248", "password");//30248

            ///  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 to display and verifying all sort by buttons are displayed and enabled
            Browser.WaitForElement(Bys.GCEPPage.ResidentCourseTrackerLbl, TimeSpan.FromSeconds(120), ElementCriteria.IsVisible);
            Assert.True(Gcep.ResidentGCEPSortBYDueDateBtn.Displayed);
            Assert.True(Gcep.ResidentGCEPSortBYDurationBtn.Displayed);
            Assert.True(Gcep.ResidentGCEPSortBYProgressBtn.Displayed);


            ///  4.If Start Now button disabled then scrol down and click show elective courses
            if (Gcep.ResidentCouseStartNowBtn.GetAttribute("class").Contains("disabled"))
            {
                Gcep.ScrolltoGetAllCourses();
                Gcep.ResidentGcepShowElectiveCourseLnk.Click();
            }

            ///  5.Scrolling down and saving all courses headers.
            Gcep.ScrolltoGetAllCourses();
            List <string> courseTitlesByDueDate = new List <string>(Browser.FindElements(By.XPath("//div[@class='row activity-listing-row']//h4")).Select(iw => iw.Text));


            ///  6.Getting locked courses headers and comparing with all courses headers by due date if its matching removing locked courses headers
            List <string> lockedCourseTitlesByDueDate = new List <string>(Browser.FindElements(By.XPath(" //span[@class='locked']/../..//div[@class='activity-info-name']/h4")).Select(iw => iw.Text));

            if (lockedCourseTitlesByDueDate.Count > 0)
            {
                for (int i = 0; i < courseTitlesByDueDate.Count; i++)
                {
                    for (int j = 0; j < lockedCourseTitlesByDueDate.Count; j++)
                    {
                        if (courseTitlesByDueDate[i] == lockedCourseTitlesByDueDate[j])
                        {
                            courseTitlesByDueDate.Remove(courseTitlesByDueDate[i]);
                        }
                    }
                }
            }

            ///  7.Getting completed courses headers and comparing  with all courses headers by due date if its matching removing completed courses headers.
            List <string> completedCourseTitlesByDueDate = new List <string>(Browser.FindElements(By.XPath(" //span[@class='completed-date ng-binding']/../..//div[@class='activity-info-name']/h4")).Select(iw => iw.Text));

            if (completedCourseTitlesByDueDate.Count > 0)
            {
                for (int i = 0; i < courseTitlesByDueDate.Count; i++)
                {
                    for (int j = 0; j < completedCourseTitlesByDueDate.Count; j++)
                    {
                        if (courseTitlesByDueDate[i] == completedCourseTitlesByDueDate[j])
                        {
                            courseTitlesByDueDate.Remove(courseTitlesByDueDate[i]);
                        }
                    }
                }
            }

            ///  8.After removing locked courses and completed courses headers getting first course header and saving it.Then clicking start now button
            string firstCourseTitleByDueDate = courseTitlesByDueDate[0];

            ElemSet.ScrollToElement(Browser, Gcep.ResidentCourseTrackerLbl);
            CourseTestPage CTP = Gcep.ClickToAdvance(Gcep.ResidentCouseStartNowBtn);

            ///  9.getting course name header and comparing with our first course header what saved above and navigating back
            string startedCourseTitleByDueDate = CTP.CourseTitleLbl.Text;

            Assert.AreEqual(firstCourseTitleByDueDate, startedCourseTitleByDueDate);
            Browser.Navigate().Back();
            Gcep.WaitForInitialize();

            Gcep.ResidentGCEPSortBYDurationBtn.Click();
            Gcep.WaitForInitialize();
            if (Gcep.ResidentCouseStartNowBtn.GetAttribute("class").Contains("disabled"))
            {
                Gcep.ScrolltoGetAllCourses();
                Gcep.ResidentGcepShowElectiveCourseLnk.Click();
            }

            Gcep.ScrolltoGetAllCourses();

            List <string> courseTitlesByDuration = new List <string>(Browser.FindElements(By.XPath("//div[@class='row activity-listing-row']//h4")).Select(iw => iw.Text));

            List <string> lockedCourseTitlesByDuration = new List <string>(Browser.FindElements(By.XPath(" //span[@class='locked']/../..//div[@class='activity-info-name']/h4")).Select(iw => iw.Text));

            if (lockedCourseTitlesByDuration.Count > 0)
            {
                for (int i = 0; i < courseTitlesByDuration.Count; i++)
                {
                    for (int j = 0; j < lockedCourseTitlesByDuration.Count; j++)
                    {
                        if (courseTitlesByDuration[i] == lockedCourseTitlesByDuration[j])
                        {
                            courseTitlesByDuration.Remove(courseTitlesByDuration[i]);
                        }
                    }
                }
            }

            List <string> completedCourseTitlesByDuration = new List <string>(Browser.FindElements(By.XPath(" //span[@class='completed-date ng-binding']/../..//div[@class='activity-info-name']/h4")).Select(iw => iw.Text));

            if (completedCourseTitlesByDuration.Count > 0)
            {
                for (int i = 0; i < courseTitlesByDuration.Count; i++)
                {
                    for (int j = 0; j < completedCourseTitlesByDuration.Count; j++)
                    {
                        if (courseTitlesByDuration[i] == completedCourseTitlesByDuration[j])
                        {
                            courseTitlesByDuration.Remove(courseTitlesByDuration[i]);
                        }
                    }
                }
            }

            string firstCourseTitleByDuration = courseTitlesByDuration[0];

            ElemSet.ScrollToElement(Browser, Gcep.ResidentCourseTrackerLbl);
            CTP = Gcep.ClickToAdvance(Gcep.ResidentCouseStartNowBtn);

            string startedCourseTitleByDuration = CTP.CourseTitleLbl.Text;

            Assert.AreEqual(firstCourseTitleByDuration, startedCourseTitleByDuration);

            Browser.Navigate().Back();
            Gcep.WaitForInitialize();

            Gcep.ResidentGCEPSortBYProgressBtn.Click();
            Gcep.WaitForInitialize();

            if (Gcep.ResidentCouseStartNowBtn.GetAttribute("class").Contains("disabled"))
            {
                Gcep.ScrolltoGetAllCourses();
                Gcep.ResidentGcepShowElectiveCourseLnk.Click();
            }

            Gcep.ScrolltoGetAllCourses();

            List <string> courseTitlesProgress = new List <string>(Browser.FindElements(By.XPath("//div[@class='row activity-listing-row']//h4")).Select(iw => iw.Text));

            List <string> lockedCourseTitlesByProgress = new List <string>(Browser.FindElements(By.XPath(" //span[@class='locked']/../..//div[@class='activity-info-name']/h4")).Select(iw => iw.Text));

            if (lockedCourseTitlesByProgress.Count > 0)
            {
                for (int i = 0; i < courseTitlesProgress.Count; i++)
                {
                    for (int j = 0; j < lockedCourseTitlesByProgress.Count; j++)
                    {
                        if (courseTitlesProgress[i] == lockedCourseTitlesByProgress[j])
                        {
                            courseTitlesProgress.Remove(courseTitlesProgress[i]);
                        }
                    }
                }
            }

            List <string> completedCourseTitlesByProgress = new List <string>(Browser.FindElements(By.XPath(" //span[@class='completed-date ng-binding']/../..//div[@class='activity-info-name']/h4")).Select(iw => iw.Text));

            if (completedCourseTitlesByProgress.Count > 0)
            {
                for (int i = 0; i < courseTitlesProgress.Count; i++)
                {
                    for (int j = 0; j < completedCourseTitlesByProgress.Count; j++)
                    {
                        if (courseTitlesProgress[i] == completedCourseTitlesByProgress[j])
                        {
                            courseTitlesProgress.Remove(courseTitlesProgress[i]);
                        }
                    }
                }
            }

            string firstCourseTitleByProgress = courseTitlesProgress[0];

            ElemSet.ScrollToElement(Browser, Gcep.ResidentCourseTrackerLbl);
            CTP = Gcep.ClickToAdvance(Gcep.ResidentCouseStartNowBtn);

            string startedCourseTitleByProgress = CTP.CourseTitleLbl.Text;

            Assert.AreEqual(firstCourseTitleByProgress, startedCourseTitleByProgress);

            Browser.Navigate().Back();
            Gcep.WaitForInitialize();
        }
        public void MemberBenefits()

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

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

            ElemSet.ScrollToElement(browser, MPG.FaceBookLnk);

            List <string> benefitTitlesAMAlevel_Published = new List <string>(Browser.FindElements(By.XPath("//div[@class='col-lg-3 col-md-3 col-sm-3 col-xs-6 ng-scope']/span")).Select(ow => ow.Text));

            GCEP = MPG.ClickToAdvance(MPG.GMECompetencyEducationProgramLnk);
            GCEP.AdminSwitchBtn.Click();
            GCEP.WaitForInitialize();
            GCEP.ScrolltoGetAllCourses();
            ElemSet.ScrollToElement(Browser, GCEP.FaceBookLnk);

            List <string> benefitTitlesResidentlevel = new List <string>(Browser.FindElements(By.XPath("//div[@class='col-lg-3 col-md-3 col-sm-3 col-xs-6 ng-scope']/span")).Select(ow => ow.Text));

            Assert.AreEqual(benefitTitlesAMAlevel_Published, benefitTitlesResidentlevel);



            GCEP.GMECompetencyEducationProgramLnk.Click();
            GCEP.WaitForInitialize();
            if (BrowserName == BrowserNames.InternetExplorer)
            {
                Browser.WaitForElement(Bys.GCEPPage.MemberBenefitsManagementLnk, TimeSpan.FromSeconds(90), ElementCriteria.IsEnabled);
            }

            MPG = GCEP.ClickToAdvance(GCEP.MemberBenefitsManagementLnk);
            List <string> benefitTitlesAMAlevel_Not_Published = new List <string>(Browser.FindElements(By.XPath("//div[@class='col-lg-3 col-md-3 col-sm-3 col-xs-6 cross-sell-list-item ng-scope']/div[@class='margin-top-bottom-20 margin-bottom-15 ng-binding']")).Select(ow => ow.Text));

            if (benefitTitlesAMAlevel_Published.Count == benefitTitlesAMAlevel_Not_Published.Count)
            {
                MPG.TitleTxt.SendKeys("newBenefit");
                MPG.URLTxt.SendKeys("www.google.com");
                FileUtils.UploadFileUsingSendKeys(Browser, MPG.MembershipFormBrowseHiddenBtn, Bys.MemberBenefitPage.MembershipFormBrowseHiddenBtn, @"C:\upload\physician_save_0.jpg");
                MPG.SaveBtn.Click();
                MPG.WaitForInitialize();
            }
            ElemSet.ScrollToElement(Browser, MPG.PublishBtn);
            Thread.Sleep(500);
            MPG.PublishBtn.Click();
            MPG.WaitForInitialize();
            List <string> benefitTitlesAMAlevel_Published_firstTime = new List <string>(Browser.FindElements(By.XPath("//div[@class='col-lg-3 col-md-3 col-sm-3 col-xs-6 ng-scope']/span")).Select(ow => ow.Text));

            GCEP = MPG.ClickToAdvance(MPG.GMECompetencyEducationProgramLnk);
            GCEP.ClickToAdvance(GCEP.SignOutLnk);

            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser("10031198", "password");
            GCEP = ED.ClickToAdvance(ED.GcepLnk);

            GCEP.ScrolltoGetAllCourses();
            ElemSet.ScrollToElement(Browser, GCEP.FaceBookLnk);

            List <string> benefitTitlesResidentlevel_firstTime = new List <string>(Browser.FindElements(By.XPath("//div[@class='col-lg-3 col-md-3 col-sm-3 col-xs-6 ng-scope']/span")).Select(ow => ow.Text));

            Assert.AreEqual(benefitTitlesAMAlevel_Published_firstTime, benefitTitlesResidentlevel_firstTime);
            // FileUtils.UploadFileUsingSendKeys(Browser, MPG.MembershipFormBrowseHiddenBtn, Bys.MemberBenefitPage.MembershipFormBrowseHiddenBtn, @"C:\upload\physician_save_0.jpg");
            // MPG.ChooseFileBtn.Click();

            GCEP.ClickToAdvance(GCEP.SignOutLnk);

            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser(role.Username, role.Password);
            GCEP = ED.ClickToAdvance(ED.GcepLnk);
            MPG  = GCEP.ClickToAdvance(GCEP.MemberBenefitsManagementLnk);

            IWebElement benefitToDelete = Browser.FindElement(By.XPath("//div[@class = 'margin-top-bottom-20 margin-bottom-15 ng-binding' and contains (text(),'newBenefit')]/..//span[@class='glyphicon glyphicon-remove cursor-pointer']"));

            benefitToDelete.Click();
            Thread.Sleep(500);
            MPG.AcceptBtn.Click();
            MPG.WaitForInitialize();

            MPG.PublishBtn.Click();
            MPG.WaitForInitialize();


            List <string> benefitTitlesAMAlevel_Published_secondTime = new List <string>(Browser.FindElements(By.XPath("//div[@class='col-lg-3 col-md-3 col-sm-3 col-xs-6 ng-scope']/span")).Select(ow => ow.Text));

            GCEP = MPG.ClickToAdvance(MPG.GMECompetencyEducationProgramLnk);
            GCEP.ClickToAdvance(GCEP.SignOutLnk);

            LP   = Navigation.GoToLoginPage(browser);
            ED   = LP.LoginAsUser("10031198", "password");
            GCEP = ED.ClickToAdvance(ED.GcepLnk);

            GCEP.ScrolltoGetAllCourses();
            ElemSet.ScrollToElement(Browser, GCEP.FaceBookLnk);

            List <string> benefitTitlesResidentlevel_secondTime = new List <string>(Browser.FindElements(By.XPath("//div[@class='col-lg-3 col-md-3 col-sm-3 col-xs-6 ng-scope']/span")).Select(ow => ow.Text));

            Assert.AreEqual(benefitTitlesAMAlevel_Published_secondTime, benefitTitlesResidentlevel_secondTime);


            Thread.Sleep(15000);
        }
Exemple #30
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");
            }
        }