Beispiel #1
0
        /// <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);
        }
Beispiel #2
0
        public void NavToHIPPSubmission(int testCount)
        {
            IWebDriver   driver    = new ChromeDriver();
            APHPHomePage loginPage = new APHPHomePage(driver);

            driver.Url = "https://10.3.29.100:44305";
            driver.Manage().Window.Maximize();
            WorkerPortalLandingPage landingPage = new WorkerPortalLandingPage(driver);
            HIPPSearchPage          hIPPSearch  = new HIPPSearchPage(driver);


            loginPage.LoginPage("bryar.h.wrkr", "Password123");
            landingPage.HippApplicationSearch();
        }
Beispiel #3
0
 public void TestTest()
 {
     #region config test
     ExtentTest test     = null;
     string     scenario = "Nav to HIPP Submission";
     context = new ChromeDriver();
     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);
     context.Url = startUp.AssetPTWorker;
     context.Manage().Window.Maximize();
     #endregion
 }
Beispiel #4
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);
        }
Beispiel #5
0
        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);
        }
        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);
        }
Beispiel #7
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);
        }
Beispiel #8
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);
        }
Beispiel #9
0
        public void GenericTestMethod()
        {
            #region Start up
            ExtentTest test = null;
            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);
            CreateHIPPApplicationWorker app                        = new CreateHIPPApplicationWorker();
            HIPPWorkFlow                workFlow                   = new HIPPWorkFlow();
            WordDocGen                  genWordDoc                 = new WordDocGen();
            ClaimsSearchPage            claimsSearchPage           = new ClaimsSearchPage(context);
            SubmitClaimApplicationPage  submitClaimApplicationPage = new SubmitClaimApplicationPage();
            ClaimSummaryInformation     summaryInformation         = new ClaimSummaryInformation(context);
            BeginNewClaimPage           beginNewClaimPage          = new BeginNewClaimPage(context);
            context.Url = startUp.AWSINTWoker;
            context.Manage().Window.Maximize();
            DateTime now = DateTime.Now;

            #endregion

            System.IO.Directory.CreateDirectory(screenshotLocation);

            //DocX doc = genWordDoc.CreateWordDoc();
            //TestCase testCase = utility.GetTestCase();
            //string testName = testCase.TestCaseId.ToString() + "_" + testCase.TestCaseName.Replace(" ", "_") + ".docx";
            //string scenario = testCase.TestCaseName;

            string usernameINTWorker = "bryar.h.wrkr";
            string passwordINTWorker = "Password123";
            try
            {
                loginPage.LoginPage(usernameINTWorker, passwordINTWorker);
                //utility.RecordStepStatusMAIN("Login APHP success", screenshotLocation, "LoginSuccess", doc);
                generic.HoverByLinkText("Claims And Authorizations");
                generic.LinkTextClick("Claim Search");
                claimsSearchPage.BeginNewClaimClick();
                beginNewClaimPage.SelectClaimType("Professional");
                beginNewClaimPage.ClickBeginNewClaim();
                generic.CheveronClick("9");
                Console.WriteLine(summaryInformation.GetAdjustedStatus);
                Console.WriteLine(summaryInformation.GetBenefitPlan);
                Console.WriteLine(summaryInformation.GetClaimEncounterStatus);
            }


            catch (NoSuchElementException e)
            {
                // utility.RecordStepStatusMAIN("Element you are looking for does not exist, error mssage is as follows: " + e.Message, screenshotLocation, "NoSuchElement", doc);

                throw;
            }
            catch (Exception e)
            {
                // utility.RecordStepStatusMAIN("An exception occurred within the code, please see error message: " + e.Message, screenshotLocation, "Error", doc);

                throw;
            }

            finally
            {
                try
                {
                    Thread.Sleep(3000);
                    //doc.SaveAs("C:\\Users\\"  + userName + "\\Desktop\\TestResults\\" + testName);
                    //Process.Start("WINWORD.EXE", "C:\\Users\\"  + userName + "\\Desktop\\TestResults\\" + testName);
                    Generic.signoutBtn.Click();
                    context.Close();
                }
                catch
                {
                    context.Close();
                }
            }
        }
Beispiel #10
0
        public void HIPPSubmissionPend(string stat, int age, bool renewalStatus)
        {
            ScreenCaputres caputres = new ScreenCaputres();
            //caputres.TakeVideo(@"C:\\Users\\bryar.h.cole\Desktop\\TestResults\\");
            string userName = "******";

            #region Start up
            ExtentTest    test    = null;
            ChromeOptions options = new ChromeOptions();
            //options.AddArgument("--headless");
            context = new ChromeDriver(options);
            context.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            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);
            CreateHIPPApplicationWorker app         = new CreateHIPPApplicationWorker();
            HIPPWorkFlow                workFlow    = new HIPPWorkFlow();
            WordDocGen                  genWordDoc  = new WordDocGen();
            context.Url = startUp.AWSINTWoker;
            context.Manage().Window.Maximize();
            DateTime now = DateTime.Now;

            #endregion
            StringBuilder stringBuilder      = new StringBuilder();
            string        screenshotLocation = @"C:\Users\bryar.h.cole\Desktop\TestResults\";


            try
            {
                loginPage.LoginPage("bryar.h.wrkr", "user@123A", startUp.AWSINTWoker);
                //loginPage.LoginPage("harish.ne.wrkr", "user@1234");

                landingPage.HippApplicationSearch();

                while (context.Title == "HIPP Application Search")
                {
                    hIPPSearch.ClickBeginNewApp();
                }
                if (context.Title == "HIPP Application")
                {
                    try
                    {
                        app.SubmitHIPPCaseSubmissionWorker(context, renewalStatus, age);
                    }
                    catch (WebDriverTimeoutException e)
                    {
                        stringBuilder.AppendLine("Seems like a timeout exception occured. For this test. Status was " + stat + ", age: " + age);
                        ScreenCaputres.TakeSreenShot(context, screenshotLocation + stat + age + "error.png");
                    }
                }
                else
                {
                    hIPPSearch.ClickBeginNewApp();
                }
                try
                {
                    string appNumber = workFlow.HippWorkFlow(stat, context);
                    stringBuilder.AppendLine("Appnumber is " + appNumber + " for candidate who is age: " + age + "\n" + "Time of test: " + now + "\n" + "***********");
                }
                catch (WebDriverTimeoutException e)
                {
                    WorkItemComponent workItemComponent = new WorkItemComponent(context);

                    string appNumber = workItemComponent.GatherAppNumber();

                    stringBuilder.AppendLine("Appnumber is " + appNumber + " for candidate who is age: " + age + "\n" + "Time of test: " + now + "\n" + "***********");
                }
            }


            catch (NoSuchElementException e)
            {
                //caputres.StopVideo();
                throw;
            }
            catch (Exception e)
            {
                //caputres.StopVideo();

                throw;
            }

            finally
            {
                try
                {
                    Thread.Sleep(3000);
                    //Generic.signoutBtn.Click();
                    //context.Close();
                    System.IO.File.AppendAllText(@"C:\Users\bryar.h.cole\Desktop\testResults.txt", stringBuilder.ToString());
                }
                catch
                {
                    //context.Close();
                }
            }
        }
Beispiel #11
0
        public void TC_IT03_HIPP_Workflow(string stat, int testCaseID, bool renewalStatus)
        {
            ScreenCaputres caputres = new ScreenCaputres();
            //caputres.TakeVideo(@"C:\\Users\\bryar.h.cole\Desktop\\TestResults\\");
            string userName = "******";

            #region Start up
            ExtentTest test = null;
            context = new ChromeDriver();
            context.Manage().Timeouts().ImplicitWait = TimeSpan.FromSeconds(5);

            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);
            CreateHIPPApplicationWorker app         = new CreateHIPPApplicationWorker();
            HIPPWorkFlow                workFlow    = new HIPPWorkFlow();
            WordDocGen                  genWordDoc  = new WordDocGen();
            context.Url = startUp.AWSINTWoker;
            context.Manage().Window.Maximize();
            DateTime now = DateTime.Now;

            #endregion

            System.IO.Directory.CreateDirectory(screenshotLocation);

            DocX     doc      = genWordDoc.CreateWordDoc(testCaseID, 152045);
            TestCase testCase = utility.GetTestCase(testCaseID, 152045);
            string   testName = testCase.TestCaseId.ToString() + "_" + testCase.TestCaseName.Replace(" ", "_") + ".docx";
            string   scenario = testCase.TestCaseName;


            try
            {
                doc.InsertBookmark("Pass 1");
                doc.InsertBookmark("Pass 2");
                loginPage.LoginPage("bryar.h.wrkr", "user@123A", startUp.AWSINTWoker);
                //loginPage.LoginPage("harish.ne.wrkr", "user@1234");

                utility.RecordStepStatusMAIN("Login APHP success", screenshotLocation, "LoginSuccess", doc);
                landingPage.HippApplicationSearch();
                hIPPSearch.ClickBeginNewApp();
                //hIPPSearch.ClickBeginNewApp();

                app.SubmitHIPPCaseSubmissionWorker(context, renewalStatus, screenshotLocation, doc);
                string appNumber = workFlow.HippWorkFlow(stat, context, screenshotLocation, doc);
            }


            catch (NoSuchElementException e)
            {
                utility.RecordStepStatusMAIN("Element you are looking for does not exist, error mssage is as follows: " + e.Message, screenshotLocation, "NoSuchElement", doc);
                //caputres.StopVideo();
                throw;
            }
            catch (Exception e)
            {
                utility.RecordStepStatusMAIN("An exception occurred within the code, please see error message: " + e.Message, screenshotLocation, "Error", doc);
                //caputres.StopVideo();

                throw;
            }

            finally
            {
                try
                {
                    Thread.Sleep(3000);
                    doc.SaveAs("C:\\Users\\" + userName + "\\Desktop\\TestResults\\" + testName);
                    Process.Start("WINWORD.EXE", "C:\\Users\\" + userName + "\\Desktop\\TestResults\\" + testName);
                    //Generic.signoutBtn.Click();
                    //context.Close();
                }
                catch
                {
                    //context.Close();
                }
            }
        }
        public void General_test(string memberId, int testCaseID)
        {
            string location           = "C:\\Users\\" + userName + "\\Desktop\\EvidenceDocsforcase " + testCaseID + "GeneralTest";
            string screenshotLocation = location + "\\images\\";

            #region Start up
            ExtentTest test = null;
            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);
            InitiateTest            startUp      = new InitiateTest(context);
            WordDocGen              genWordDoc   = new WordDocGen();
            MemberSearchPage        membersearch = new MemberSearchPage(context);
            MedicareBuyIn           buyIn        = new MedicareBuyIn(context);
            context.Url = startUp.AWSINTWoker;
            context.Manage().Window.Maximize();
            DateTime now = DateTime.Now;

            #endregion

            System.IO.Directory.CreateDirectory(screenshotLocation);

            DocX     doc      = genWordDoc.CreateWordDoc(testCaseID, 152045);
            TestCase testCase = utility.GetTestCase(testCaseID, 152045);
            string   testName = testCase.TestCaseId.ToString() + "_" + testCase.TestCaseName.Replace(" ", "_") + ".docx";
            string   scenario = testCase.TestCaseName;



            try
            {
                loginPage.LoginPage("robert", "user@123A");
                utility.RecordStepStatusMAIN("Login APHP success", screenshotLocation, "LoginSuccess", doc);

                landingPage.MemberHover();
                generic.LinkTextClick("Member Search");
                membersearch.SearchMember("Member ID", "Contains", memberId);
                membersearch.SearchButtonClick();

                generic.LinkTextClick(memberId);
                generic.LinkTextClick("Transactions");
                utility.RecordStepStatusMAIN("Add new item displayed", screenshotLocation, "Buy in displayed", doc);
                generic.LinkTextClick("Add new item");
                utility.RecordStepStatusMAIN("Add new item", screenshotLocation, "Grid is displayed", doc);

                //Inputs
                buyIn.RICInput("A");
                buyIn.MedicarePartInput("A");

                buyIn.TransactionCodeInput(utility.RandomNumericString(9));
                buyIn.BuyInEligibilityCodeInput("A");
                buyIn.SentRecievedDateInput(now.ToString("MM/dd/yyyy"));
                buyIn.TransactionEffectiveToFromInput(now.ToString("01/01/1991"));
                //buyIn.TransactionEffectiveToFromInput(now.ToString("MM/dd/yyyy"));

                buyIn.SubCodeInput("B");
                buyIn.TransactionEffectiveDateFromInput(now.AddMonths(-9).ToString("01/01/1991"));
                //buyIn.TransactionEffectiveDateFromInput(now.AddMonths(-9).ToString("MM/dd/yyyy"));
                buyIn.PremiumInput("00120$");
                //end Inputs

                utility.RecordStepStatusMAIN("Input before insert", screenshotLocation, "InfoInput", doc);

                generic.LinkTextClick("Insert");
                utility.RecordStepStatusMAIN("Input after insert", screenshotLocation, "Afterinput", doc);

                buyIn.clickSaveButton();
                utility.RecordStepStatusMAIN("Save Button", screenshotLocation, "AfterSave", doc);

                landingPage.MemberHover();
                generic.LinkTextClick("Member Search");
                membersearch.SearchMember("Member ID", "Contains", memberId);
                membersearch.SearchButtonClick();
                generic.LinkTextClick(memberId);

                generic.LinkTextClick("Transactions");
                utility.RecordStepStatusMAIN("Results", screenshotLocation, "ResultDisplayed", doc);
            }

            #region try catch logic

            catch (NoSuchElementException e)
            {
                utility.RecordStepStatusMAIN("Element you are looking for does not exist, error mssage is as follows: " + e.Message, screenshotLocation, "NoSuchElement", doc);

                throw;
            }
            catch (Exception e)
            {
                utility.RecordStepStatusMAIN("An exception occurred within the code, please see error message: " + e.Message, screenshotLocation, "Error", doc);

                throw;
            }

            finally
            {
                try
                {
                    Thread.Sleep(3000);
                    doc.SaveAs("C:\\Users\\" + userName + "\\Desktop\\TestResults\\" + testName);
                    Process.Start("WINWORD.EXE", "C:\\Users\\" + userName + "\\Desktop\\TestResults\\" + testName);
                    Generic.signoutBtn.Click();
                    context.Close();
                }
                catch
                {
                    context.Close();
                }
            }

            #endregion
        }
Beispiel #13
0
        static void Main(string[] args)
        {
            //Console.WriteLine("Enter Username and Password");
            //string username = Console.ReadLine();

            //string password = Console.ReadLine();

            //CreateHIPPApplication app = new CreateHIPPApplication();
            //IWebDriver context = new ChromeDriver();
            //app.SubmitHIPPCaseSubmissionUltimate(context, false, username, password);


            //GenericTestMethod();
            MemberInput();
            void MemberInput()
            {
                IWebDriver     context;
                ScreenCaputres caputres = new ScreenCaputres();
                //caputres.TakeVideo(@"C:\\Users\\bryar.h.cole\Desktop\\TestResults\\");
                string userName = "******";

                #region Start up
                ExtentTest test = null;
                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);
                MemberPortalDashBoard       landingPage           = new MemberPortalDashBoard(context);
                InitiateTest                startUp               = new InitiateTest(context);
                HIPPWorkFlow                hIPPWorkFlow          = new HIPPWorkFlow();
                CreateHIPPApplicationMember app                   = new CreateHIPPApplicationMember();
                MyHIPPApplicationPage       myHIPPApplicationPage = new MyHIPPApplicationPage(context);
                context.Url = startUp.AWSINTWoker;
                context.Manage().Window.Maximize();
                DateTime now = DateTime.Now;

                #endregion

                //System.IO.Directory.CreateDirectory(screenshotLocation);

                //DocX doc = genWordDoc.CreateWordDoc(testCaseID, 152045);
                //TestCase testCase = utility.GetTestCase(testCaseID, 152045);
                //string testName = testCase.TestCaseId.ToString() + "_" + testCase.TestCaseName.Replace(" ", "_") + ".docx";
                //string scenario = testCase.TestCaseName;


                try
                {
                    loginPage.LoginPage("willbsmith", "user@123A");
                    //utility.RecordStepStatusMAIN("Login APHP success", screenshotLocation, "LoginSuccess");
                    string appnumber;
                    //hIPPSearch.ClickBeginNewApp();
                    generic.HoverByLinkText("HIPP Application");
                    generic.LinkTextClick("My HIPP Application");
                    myHIPPApplicationPage.InputSelectType("New");
                    myHIPPApplicationPage.BeginApplicationClick();
                    if (myHIPPApplicationPage.IsErrorVisible())
                    {
                        appnumber = myHIPPApplicationPage.GetAppNumber();
                        generic.LinkTextClick("Logout");
                        hIPPWorkFlow.FIllHIPPApplicationInfo(context, appnumber);
                    }
                    else
                    {
                        app.SubmitHIPPCaseSubmissionMember(context);
                    }
                }


                catch (NoSuchElementException e)
                {
                    //utility.RecordStepStatusMAIN("Element you are looking for does not exist, error mssage is as follows: " + e.Message, screenshotLocation, "NoSuchElement");
                    throw;
                }
                catch (Exception e)
                {
                    //utility.RecordStepStatusMAIN("An exception occurred within the code, please see error message: " + e.Message, screenshotLocation, "Error", doc);
                    throw;
                }

                finally
                {
                    try
                    {
                        Thread.Sleep(3000);
                        //doc.SaveAs("C:\\Users\\" + userName + "\\Desktop\\TestResults\\" + testName);
                        //Process.Start("WINWORD.EXE", "C:\\Users\\" + userName + "\\Desktop\\TestResults\\" + testName);
                        //Generic.signoutBtn.Click();
                        //context.Close();
                    }
                    catch
                    {
                        //context.Close();
                    }
                }
            }

            //docs.CreateWordDocSuite("Bryar.h.cole", 149579, 152261);
            void GenericTestMethod()
            {
                IWebDriver context;

                #region Start up
                ExtentTest test = null;
                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);
                _ = new HIPPSearchPage(context);
                InitiateTest startUp = new InitiateTest(context);
                _ = new CreateHIPPApplicationWorker();
                _ = new HIPPWorkFlow();
                _ = new WordDocGen();
                ClaimsSearchPage claimsSearchPage = new ClaimsSearchPage(context);
                _ = new SubmitClaimApplicationPage();
                ClaimSummaryInformation summaryInformation = new ClaimSummaryInformation(context);
                BeginNewClaimPage       beginNewClaimPage  = new BeginNewClaimPage(context);
                context.Url = startUp.AWSINTWoker;
                context.Manage().Window.Maximize();
                DateTime now = DateTime.Now;

                #endregion

                //System.IO.Directory.CreateDirectory(screenshotLocation);

                //DocX doc = genWordDoc.CreateWordDoc();
                //TestCase testCase = utility.GetTestCase();
                //string testName = testCase.TestCaseId.ToString() + "_" + testCase.TestCaseName.Replace(" ", "_") + ".docx";
                //string scenario = testCase.TestCaseName;

                string usernameINTWorker = "bryar.h.wrkr";
                string passwordINTWorker = "user@123A";
                try
                {
                    loginPage.LoginPage(usernameINTWorker, passwordINTWorker);
                    //utility.RecordStepStatusMAIN("Login APHP success", screenshotLocation, "LoginSuccess", doc);
                    generic.HoverByLinkText("Claims And Authorizations");
                    generic.LinkTextClick("Claim Search");
                    claimsSearchPage.BeginNewClaimClick();
                    beginNewClaimPage.SelectClaimType("Professional");
                    beginNewClaimPage.ClickBeginNewClaim();
                    string text  = summaryInformation.GetAdjustedStatus;
                    string text2 = summaryInformation.GetAdjustedStatus;
                    string text3 = summaryInformation.GetAdjustedStatus;


                    Console.WriteLine(text);
                    Console.WriteLine(text2);
                    Console.WriteLine(text3);
                }


                catch (NoSuchElementException e)
                {
                    // utility.RecordStepStatusMAIN("Element you are looking for does not exist, error mssage is as follows: " + e.Message, screenshotLocation, "NoSuchElement", doc);

                    throw;
                }
                catch (Exception e)
                {
                    // utility.RecordStepStatusMAIN("An exception occurred within the code, please see error message: " + e.Message, screenshotLocation, "Error", doc);

                    throw;
                }

                finally
                {
                    try
                    {
                        Thread.Sleep(3000);
                        //doc.SaveAs("C:\\Users\\"  + userName + "\\Desktop\\TestResults\\" + testName);
                        //Process.Start("WINWORD.EXE", "C:\\Users\\"  + userName + "\\Desktop\\TestResults\\" + testName);
                        Generic.signoutBtn.Click();
                        context.Close();
                    }
                    catch
                    {
                        context.Close();
                    }
                }
            }
        }