コード例 #1
0
ファイル: HIPPSearch.cs プロジェクト: bryarcole/AutomateAPHP
        /// <summary>
        /// Searchs for application number, App number must be clicked to continue in the flow
        /// </summary>
        /// <param name="appNumber"></param>
        /// <param name="context"></param>
        /// <param name="sucessCount"></param>
        /// <param name="screenshotLocation"></param>
        /// <param name="test"></param>
        /// <param name="doc"></param>
        public void HIPPAppSearch(string appNumber, IWebDriver context)
        {
            WorkerPortalLandingPage landingPage = new WorkerPortalLandingPage(context);
            HIPPSearchPage          hIPPSearch  = new HIPPSearchPage(context);
            Generic generic = new Generic(context);


            //Gather Data from app
            landingPage.HippApplicationSearch();
            hIPPSearch.SearchHiPPCase("Contains", "Application ID", appNumber);
            hIPPSearch.SearchButtonClick();
            generic.HoverByLinkText(appNumber);
        }
コード例 #2
0
        /// <summary>
        /// This is a requirement to pend any case, if your case needs to be pended.
        /// Case must be available to be pended.
        /// </summary>
        /// <param name="appNumber"></param>
        /// <param name="context"></param>
        /// <param name="sucessCount"></param>
        /// <param name="screenshotLocation"></param>
        /// <param name="test"></param>
        /// <param name="doc"></param>
        public void HippPendCase(string appNumber, IWebDriver context, string screenshotLocation, DocX doc)
        {
            APHPHomePage                    loginPage      = new APHPHomePage(context);
            WorkerPortalLandingPage         landingPage    = new WorkerPortalLandingPage(context);
            HIPPSearchPage                  hIPPSearchpage = new HIPPSearchPage(context);
            HIPPSubmitApplicationPageWorker submitApp      = new HIPPSubmitApplicationPageWorker(context);
            WorkItemComponent               workitem       = new WorkItemComponent(context);
            Generic      generic    = new Generic(context);
            Utility      utility    = new Utility(context);
            HIPPSearch   hIPPSearch = new HIPPSearch();
            InitiateTest startUp    = new InitiateTest(context);

            context.Url = startUp.AWSINTWoker;
            generic.CheveronClick("3");
            generic.CheveronClick("4");
            workitem.btnActivityDone.Click();
            workitem.ClickCompletedButton();
            context.Url = startUp.AWSINTWoker;
            workitem.ClickExitButton();
            landingPage.HippApplicationSearch();
            hIPPSearchpage.SearchHiPPCase("Contains", "Application ID", appNumber);
            hIPPSearchpage.SearchButtonClick();
            generic.HoverByLinkText(appNumber);
            utility.RecordStepStatusMAIN("Search results", screenshotLocation, "SearchResults", doc);
            generic.LinkTextClick(appNumber);

            workitem.ClickWorkItemButton();
            Thread.Sleep(3000);

            generic.CheveronClick("3");
            generic.CheveronClick("4");
            workitem.ClickPendButton();
            generic.CheveronClick("3");
            generic.CheveronClick("4");
            generic.HoverByElement(workitem.ActivitystatusResn);

            Thread.Sleep(2000);
            utility.RecordStepStatusMAIN("Status is Pended", screenshotLocation, "PendedStatus", doc);

            workitem.ClickCompletedButton();
            utility.RecordStepStatusMAIN("Case Completed", screenshotLocation, "Case Completed", doc);
        }
コード例 #3
0
ファイル: ShowAndTell.cs プロジェクト: bryarcole/AutomateAPHP
        public void AphpLogin()
        {
            APHPHomePage            homepage    = new APHPHomePage(context);
            WorkerPortalLandingPage landingPage = new WorkerPortalLandingPage(context);
            HIPPSearchPage          searchPage  = new HIPPSearchPage(context);
            Generic generic = new Generic(context);

            IWebElement table     = context.FindElement(By.Id("ctl00_ctl00_pageContentMaster_criteria1_grdHippSearchResults_ctl00__0"));
            string      appnumber = "10000151";

            homepage.LoginPage("bryar.h.wrkr", "Password123");

            landingPage.HippApplicationSearch();

            searchPage.SearchHiPPCase("contains", "Application ID", appnumber);
            searchPage.SearchButtonClick();

            Assert.IsTrue(table.Displayed);

            generic.LinkTextClick(appnumber);
        }
コード例 #4
0
        public void FIllHIPPApplicationInfo()
        {
            #region Start up
            ExtentTest    test          = null;
            string        scenario      = "HIPP Submisssion WorkFlow";
            ChromeOptions chromeOptions = new ChromeOptions();
            chromeOptions.AddArgument("--headless");
            context = new ChromeDriver();
            context.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Generic generic = new Generic(context);
            Utility utility = new Utility(context);

            APHPHomePage                    loginPage   = new APHPHomePage(context);
            WorkerPortalLandingPage         landingPage = new WorkerPortalLandingPage(context);
            HIPPSearchPage                  hIPPSearch  = new HIPPSearchPage(context);
            InitiateTest                    startUp     = new InitiateTest(context);
            HIPPSubmitApplicationPageWorker submitApp   = new HIPPSubmitApplicationPageWorker(context);
            WorkItemComponent               workitem    = new WorkItemComponent(context);
            CreateHIPPApplicationWorker     app         = new CreateHIPPApplicationWorker();

            context.Url = startUp.AWSINTWoker;
            context.Manage().Window.Maximize();
            DateTime now      = DateTime.Now;
            string   testName = "FillData";
            DocX     doc      = DocX.Create(testName);


            #endregion

            loginPage.LoginPage("bryar.h.wrkr", "user@123A");
            landingPage.HippApplicationSearch();
            hIPPSearch.SearchHiPPCase("Contains", "Application ID", "10000214");
            hIPPSearch.SearchButtonClick();
            generic.LinkTextClick("10000214");
            workitem.ClickWorkItemButton();
            Thread.Sleep(3000);
            //hIPPSearch.ClickBeginNewApp();
            app.SubmitHIPPCaseSubmissionWorker(context, false, screenshotLocation, doc);
        }
コード例 #5
0
        public void FIllHIPPApplicationInfo(IWebDriver context, string AppNumber)
        {
            #region Start up
            context.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);
            Generic generic = new Generic(context);

            APHPHomePage                    loginPage   = new APHPHomePage(context);
            WorkerPortalLandingPage         landingPage = new WorkerPortalLandingPage(context);
            HIPPSearchPage                  hIPPSearch  = new HIPPSearchPage(context);
            InitiateTest                    startUp     = new InitiateTest(context);
            HIPPSubmitApplicationPageWorker submitApp   = new HIPPSubmitApplicationPageWorker(context);
            WorkItemComponent               workitem    = new WorkItemComponent(context);
            CreateHIPPApplicationWorker     app         = new CreateHIPPApplicationWorker();
            #endregion
            loginPage.LoginPage("bryar.h.wrkr", "user@123A");
            landingPage.HippApplicationSearch();
            hIPPSearch.SearchHiPPCase("Contains", "Application ID", AppNumber);
            hIPPSearch.SearchButtonClick();
            generic.LinkTextClick(AppNumber);
            workitem.ClickWorkItemButton();
            Thread.Sleep(3000);
            //hIPPSearch.ClickBeginNewApp();
            app.SubmitHIPPCaseSubmissionWorker(context, false);
        }
コード例 #6
0
        /// <summary>
        /// This is the beginning workflow module. You will use this after one of the case creation modules
        /// </summary>
        /// <param name="activityReason"></param>
        /// <param name="context"></param>
        /// <param name="sucessCount"></param>
        /// <param name="screenshotLocation"></param>
        /// <param name="test"></param>
        /// <param name="doc"></param>
        public string HippWorkFlow(string activityReason, IWebDriver context, string screenshotLocation, DocX doc)
        {
            APHPHomePage                    loginPage      = new APHPHomePage(context);
            WorkerPortalLandingPage         landingPage    = new WorkerPortalLandingPage(context);
            HIPPSearchPage                  hIPPSearchpage = new HIPPSearchPage(context);
            HIPPSubmitApplicationPageWorker submitApp      = new HIPPSubmitApplicationPageWorker(context);
            WorkItemComponent               workitem       = new WorkItemComponent(context);
            Generic      generic = new Generic(context);
            Utility      utility = new Utility(context);
            InitiateTest startUp = new InitiateTest(context);

            //Gather Data from app
            generic.CheveronClick("2");
            generic.CheveronClick("3");
            generic.CheveronClick("4");

            ///Pend Application
            workitem.ActivitystatusResn_Input.Click();
            workitem.ActivitystatusResn_Input.SendKeys(activityReason);

            switch (activityReason)
            {
            case "Approved":
                workitem.ClickApproveButton();
                break;

            case "Denied":
                workitem.ClickDenyButton();
                break;

            case "Pended":
                workitem.ClickApproveButton();
                break;
            }
            generic.CheveronClick("3");
            generic.CheveronClick("4");
            generic.HoverByElement(workitem.CompletedBottom);


            workitem.ClickCompletedButton();
            utility.RecordStepStatusMAIN("Appliciation Completed", screenshotLocation, "Application Completed", doc);

            string appNumber = workitem.GatherAppNumber();
            string workItem  = workitem.GatherWorkItemType();
            string appQueue  = workitem.GetGatherWorkItemStatus();

            doc.InsertAtBookmark(appNumber + "\n " + workItem + "\n " + appQueue, "Pass 1");
            utility.RecordStepStatusMAIN("App in " + appQueue + "and in status of " + activityReason, screenshotLocation, "CheckAppStaus", doc);

            // Refresh Page
            context.Url = startUp.AWSINTWoker;

            workitem.ClickExitButton();
            landingPage.HippApplicationSearch();
            hIPPSearchpage.SearchHiPPCase("Contains", "Application ID", appNumber);
            hIPPSearchpage.SearchButtonClick();
            generic.HoverByLinkText(appNumber);
            utility.RecordStepStatusMAIN("Search results", screenshotLocation, "SearchResults", doc);
            generic.LinkTextClick(appNumber);
            if (activityReason == "Denied")
            {
                return(appNumber);
            }
            workitem.ClickWorkItemButton();
            Thread.Sleep(3000);
            generic.CheveronClick("3");
            generic.CheveronClick("4");
            string workItem2 = workitem.GatherWorkItemType();
            string appQueue2 = workitem.GetGatherWorkItemStatus();

            doc.InsertAtBookmark("\n " + "Pass 2: " + workItem2 + "\n " + appQueue2, "Pass 2");
            if (activityReason == "Pended")
            {
                HippPendCase(appNumber, context, screenshotLocation, doc);
            }
            return(appNumber);
        }