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)); }