Beispiel #1
0
        /// <summary>
        /// Before the status is Updated
        /// the status element is located in a //span not a //div
        /// </summary>
        /// <param name="status"></param>
        public void SetStatus(string status)
        {
            //Approve the staff list
            if (status.ToUpper().Equals("UNDER REVIEW"))
            {
                TestRunnerInterface.Map.providerSearchPage.StaffTab();
                TestRunnerInterface.Map.staffTab.StaffDataApproved();

                //Keep the previous status, we haven't updated it yet
                Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
            }


            //Switch to Status/Flags Tab
            TestRunnerInterface.Map.providerSearchPage.StatusFlagsTab();

            IWebDriver browser = TestRunnerInterface.Map.safePage.browser;
            //IWebElement submitted = browser.FindElement(By.XPath("//div[text()='Submitted']"));
            var query = "//span[text()='" + status + "']";
            //IWebElement submitted = browser.FindElement(By.XPath(query));
            IWebElement submitted = Libary.GetPageElement(browser, RunTimeVars.ELEMENTSEARCH.XPATH, query, RunTimeVars.REPEAT_TIMES);

            submitted.Click();


            Libary.WaitForPageLoad(RunTimeVars.REPEAT_TIMES);
            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
        }
        /// <summary>
        /// Finish New Application Driver
        /// Use hard coded Autism Data
        /// </summary>
        public void FinishApplication(ScholarshipApplicationData appData)
        {
            //**********************************
            //Define New Application Data

            //**********************************

            //Add Primary Guardian
            TestRunnerInterface.Map.providerSearchPage.ParentGuardianTab();

            var guardian = appData.newGuardian;

            //TestRunnerInterface.Map.parentGuardianTab.AddNewGuardian("Matthew,Woods,05/23/1973,Father");
            TestRunnerInterface.Map.parentGuardianTab.AddNewGuardian(guardian);

            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);

            //Add Application Data

            //Add IEP Information

            //Add Uploaded Docs
            TestRunnerInterface.Map.providerSearchPage.DocsTab();
            this.TestAddDocs();
            //this.AddDocs();

            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
        }
        /// <summary>
        /// Set Application = Review Completed
        /// Need to update the following
        /// 1. Student SSID
        /// 2. Active IEP
        /// </summary>
        public void SetReviewCompleted()
        {
            this.SetSSID();

            TestRunnerInterface.Map.studentSearchPage.IEPTab();
            TestRunnerInterface.Map.iepTab.AddNewIEP();

            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
        }
        public void SetSSID()
        {
            //Display Student Tab
            TestRunnerInterface.Map.studentSearchPage.StudentTab();
            TestRunnerInterface.Map.studentTab.WaitForStudentTabDisplay(RunTimeVars.REPEAT_TIMES);

            //Enter Student SSID
            var program = TestRunnerInterface.Map.testContext.program;

            TestRunnerInterface.Map.studentTab.UpdateSSID(program);
            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
        }
        /// <summary>
        /// Finish New Application Driver
        /// Used passed in Application Data
        /// </summary>
        /// <param name="appData"></param>
        public void FinishApplication(ProviderApplicationData appData)
        {
            //**********************************
            //Define New Application Data
            //string personnelRole;   //PERSONNEL DETAILS CSV string
            //string services;        //Type of service
            //string staff;           //Staff Member CSV string

            //**********************************

            TestRunnerInterface.Map.providerSearchPage.PersonnelTab();
            foreach (string personnelRole in appData.personnelRoleList)
            {
                TestRunnerInterface.Map.personnel.AddRole(personnelRole);
            }
            //this.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);

            //Add Sevices
            TestRunnerInterface.Map.providerSearchPage.ServicesTab();
            foreach (string services in appData.servicesList)
            {
                TestRunnerInterface.Map.servicesTab.AddService(services);
            }
            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);

            //Add Staff
            TestRunnerInterface.Map.providerSearchPage.StaffTab();
            foreach (string staff in appData.staffList)
            {
                TestRunnerInterface.Map.staffTab.AddStaff(staff);
            }

            foreach (string services in appData.servicesList)
            {
                TestRunnerInterface.Map.staffTab.AddService(services);
            }
            TestRunnerInterface.Map.staffTab.EditEmployment();
            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);

            //Add Docs based on Program Type
            var program = TestRunnerInterface.Map.testContext.program;

            TestRunnerInterface.Map.providerSearchPage.DocsTab();
            this.TestAddDocs(program);
            //this.AddDocs(program);

            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
        }
Beispiel #6
0
        public void SetScholarshipStatus(string status)
        {
            //Switch to Status/Flags Tab
            TestRunnerInterface.Map.providerSearchPage.StatusFlagsTab();

            IWebDriver browser = TestRunnerInterface.Map.safePage.browser;
            //IWebElement submitted = browser.FindElement(By.XPath("//div[text()='Submitted']"));
            var query = "//span[text()='" + status + "']";
            //IWebElement submitted = browser.FindElement(By.XPath(query));
            IWebElement submitted = Libary.GetPageElement(browser, RunTimeVars.ELEMENTSEARCH.XPATH, query, RunTimeVars.REPEAT_TIMES);

            submitted.Click();


            Libary.WaitForPageLoad(RunTimeVars.REPEAT_TIMES);
            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
        }
        /// <summary>
        /// Based on the tab name in the tab List
        /// click the application tab
        /// </summary>
        /// <param name="tabList">The tab list.</param>
        public void VerifyAdminProgramsPageTabs(List <string> tabList)
        {
            foreach (var tab in tabList)
            {
                bool error = false;

                switch (tab.ToUpper().Trim())
                {
                case "PROGRAM MANAGEMENT":
                    TestRunnerInterface.Map.adminPrograms.ProgramManagementTab();
                    break;

                case "FUNDING CATEGORY SETUP":
                    TestRunnerInterface.Map.adminPrograms.FundingCategorySetupTab();
                    break;

                case "BILLING SCHEDULE":
                    TestRunnerInterface.Map.adminPrograms.BillingScheduleTab();
                    break;


                case "ADDIN/DEDUCT SCHEDULE":
                    TestRunnerInterface.Map.adminPrograms.AddinDeductScheduleTab();
                    break;


                default:
                    error = true;
                    break;
                }

                if (error)
                {
                    throw new Exception("The Tab Name = " + tab + "Is Not Valid Name");
                }
            }

            //For some reason after the last admin page is displayed
            //the driver can not locate the signout link
            //so for a work-around Refresh the application
            Libary.RefreshApplication(RunTimeVars.Refresh.PageRefresh);
        }