Exemplo n.º 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);
        }
Exemplo n.º 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");
        }
Exemplo n.º 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 buttonorElem)
        {
            if (Browser.Exists(Bys.AssignSummaryPage.NextBtn))
            {
                if (buttonorElem.GetAttribute("id") == NextBtn.GetAttribute("id"))
                {
                    Browser.WaitForElement(Bys.AssignSummaryPage.NextBtn, ElementCriteria.IsEnabled);
                    Thread.Sleep(0500);
                    ElemSet.ScrollToElement(Browser, NextBtn);
                    NextBtn.Click();
                    Browser.WaitForElement(Bys.AMAPage.BreadCrumbLnksContainer, TimeSpan.FromSeconds(90), ElementCriteria.IsEnabled, ElementCriteria.IsVisible);
                    AssignConfirmationPage ACP = new AssignConfirmationPage(Browser);
                    ACP.WaitForInitialize();
                    return(ACP);
                }
            }
            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);
        }