예제 #1
0
        /// <summary>
        /// on this method we are assigning curriculum to the program
        /// </summary>
        /// <param name="browser"></param>
        /// <param name="CurriculumName">curriculum name what we want to assign</param>
        /// <returns></returns>
        public static string CurriculumAssignmentFlow(IWebDriver browser, string CurriculumName)
        {
            CurriculumMngPage CMP = new CurriculumMngPage(browser);

            CMP.Search(CurriculumName);
            CMP.Actioncell.Click();
            AssignProgramPage      Assign       = CMP.ClickToAdvance(CMP.AssignToProgrammLnk);
            string                 StartingDate = Assign.ChoosingStartDate();
            string                 EndingDate   = Assign.ChoosingEndDate(1, "MM/dd/yyyy");
            AssignSummaryPage      Summary      = Assign.ClickToAdvance(Assign.NextBtn);
            AssignConfirmationPage Confirmation = Summary.ClickToAdvance(Summary.NextBtn);
            string                 breadCrumpafterASsignment = Confirmation.GetBreadCrumbContainerText();

            return(breadCrumpafterASsignment);
        }
예제 #2
0
        /// <summary>
        /// this specific method adding courses to curriculum for specific program
        /// </summary>
        /// <param name="browser"></param>
        public static void AddCourseToCurriculum(IWebDriver browser)
        {
            ProgramsPage         PP         = new ProgramsPage(browser);
            CurriculumCoursePage CoursePage = PP.EditProgramm();

            CoursePage.AddOrRemoveCourses(CoursePage.AvailableCoursesTbl, CoursePage.AddSelectedBtn, 2, 3);
            PGYAssignmentPage Pgy = CoursePage.ClickToAdvance(CoursePage.NextBtn);

            Pgy.Grid_ClickElementWithoutTextInsideRow(Pgy.EditCoursePgyTbl, 2, 3);
            Pgy.Grid_ClickElementWithoutTextInsideRow(Pgy.EditCoursePgyTbl, 3, 3);
            AssignSummaryPage      Summary = Pgy.ClickToAdvance(Pgy.NextBtn);
            AssignConfirmationPage Confirm = Summary.ClickToAdvance(Summary.NextBtn);

            Confirm.ClickToAdvance(Confirm.EditConfirmBtn);
            PP.Search("Anesthesiology");
        }
예제 #3
0
        /// <summary>
        /// Clicks the user-specified button or link and then waits for a window to close or open, or a page to load,
        /// depending on the button that was clicked
        /// </summary>
        /// <param name="buttonOrLinkElem">The element to click on</param>
        public dynamic ClickToAdvance(IWebElement buttonOrLinkElem)
        {
            if (Browser.Exists(Bys.AssignProgramPage.NextBtn))
            {
                if (buttonOrLinkElem.GetAttribute("outerHTML") == NextBtn.GetAttribute("outerHTML"))
                {
                    //ElemSet.ScrollToElement(Browser, NextBtn);
                    NextBtn.Click();
                    Browser.WaitForElement(Bys.AMAPage.LoadIcon, TimeSpan.FromSeconds(120), ElementCriteria.IsNotVisible);
                    AssignSummaryPage ASP = new AssignSummaryPage(Browser);
                    ASP.WaitForInitialize();
                    return(ASP);
                }
            }
            else
            {
                throw new Exception("No button or link was found with your passed parameter. You either need to add this button to a new If statement, or if the button is already added, then the page you were on did not contain the button.");
            }

            return(null);
        }