public void goToApplciation()
 {
     _CurrentPage.As <BHGMenu>().PractitionerList.Click();
     _CurrentPage.As <BHGMenu>().QuickSearchReset.Click();
     DriverWait.WaitForPageLoaded();
     _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.Clear();
     _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.Clear();
     _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.SendKeys("Juliet"); //Change Name
     _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("Abijay");  //Change Name
     _CurrentPage.As <BHGMenu>().QuickSearchGo.Click();
     _CurrentPage.As <BHGMenu>().GridList.Click();
     WebControlsExtension.SwitchWindowToApplicationPage("#AppV3BHG > table:nth-child(5) > tbody > tr > td > font");
     DriverWait.WaitForPageLoaded();
 }
        //Case 5 Adding mutliple companies, source of primary income is ownerhsip and secondary source is outside employement with bankstatments
        //fico <=550, and 1st company sales 10k and 2nd company sales 150k and, 2nd comnpany accepts credit cards
        // [Given(@"I have completed a application multiple companies")]
        public void GivenIHaveCompletedAApplicationMultipleCompanies()
        {
            Browser.Current.Navigate().GoToUrl(ConfigurationManager.AppSettings["seleniumBaseUrl"]);
            Browser.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
            _CurrentPage = GetInstance <BHGLogin>();
            _CurrentPage.As <BHGLogin>().ClickAutoLogin();
            _CurrentPage = GetInstance <BHGMenu>();
            _CurrentPage.As <BHGMenu>().PractitionerList.Click();
            _CurrentPage.As <BHGMenu>().QuickSearchReset.Click();
            DriverWait.WaitForPageLoaded();
            _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.Clear();
            _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.Clear();
            _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.SendKeys("Juliet");
            _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("Abijay");
            _CurrentPage.As <BHGMenu>().QuickSearchGo.Click();
            _CurrentPage.As <BHGMenu>().GridList.Click();
            WebControlsExtension.SwitchWindowToApplicationPage("#AppV3BHG > table:nth-child(5) > tbody > tr > td > font");
            DriverWait.WaitForPageLoaded();
            _CurrentPage = GetInstance <BHGApplicationPage>();
            DriverWait.WaitForPageLoaded();
            _CurrentPage.As <BHGApplicationPage>().guarantorPrimIncSource.SelectItemByValueFromDDL("1");
            _CurrentPage.As <BHGApplicationPage>().intCoAcceptCCDDL.SelectItemByValueFromDDL("0");
            _CurrentPage.As <BHGApplicationPage>().intCoBankStatementsDDL.SelectItemByValueFromDDL("0");
            _CurrentPage.As <BHGApplicationPage>().intCoPriorSales.Clear();
            _CurrentPage.As <BHGApplicationPage>().intCoPriorSales.SendKeys("10000");

            //Clear program filters
            var conn = DatabaseHelper.ConnectionManager.GetSqlConnection();

            DatabaseHelper.SqlExecuteCommand("Data Source=BHG-DC1-STGSQL;" + "Initial Catalog=Vision;" + "Integrated Security=True;",
                                             @" DECLARE @ApplicationNum int = 211553 
                          UPDATE sub8900.tApplication8900
                              SET ScreenResultCore = NULL,
                                      PaystubQualified = NULL,
                                              ScreenResultAF = NULL,
                                                  ScreenResultAMI = NULL,
                                                      ScreenResultNewLogic = NULL,
                                                                      SBAQualified = NULL,
                                                      ScreenResultWeekly = NULL,
                                          ScreenResultTPFMessage = NULL,
                                                      DTIfromCBR = NULL,
                                          ScreenResultCreditCard = NULL,
                                              ScreenResultNote = NULL
                          WHERE ApplicationNum = @ApplicationNum
              UPDATE sub8900.tGuarantor8900
                  SET ScreenResultCreditCard = NULL,
              DTIPlain = NULL
              WHERE ApplicationNum = @ApplicationNum");
        }
 /****************************************************************************************************************************************************************************************
 *  //DTI for Multiple Gaurantors with AlimonyChildAmt + ChildSupportAmt
 ****************************************************************************************************************************************************************************************/
 //[Given(@"I have completed a application for Mutliple Gaurantors with with Liabilities")]
 public void GivenIHaveCompletedAApplicationForMutlipleGaurantorsWithWithLiabilities()
 {
     Browser.Current.Navigate().GoToUrl(ConfigurationManager.AppSettings["seleniumBaseUrl"]);
     Browser.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
     _CurrentPage = GetInstance <BHGLogin>();
     _CurrentPage.As <BHGLogin>().ClickAutoLogin();
     _CurrentPage = GetInstance <BHGMenu>();
     _CurrentPage.As <BHGMenu>().PractitionerList.Click();
     _CurrentPage.As <BHGMenu>().QuickSearchReset.Click();
     DriverWait.WaitForPageLoaded();
     _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.Clear();
     _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.Clear();
     _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.SendKeys("Juliet"); //Change Name
     _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("Abijay");  //Change Name
     _CurrentPage.As <BHGMenu>().QuickSearchGo.Click();
     _CurrentPage.As <BHGMenu>().GridList.Click();
     WebControlsExtension.SwitchWindowToApplicationPage("#AppV3BHG > table:nth-child(5) > tbody > tr > td > font");
     DriverWait.WaitForPageLoaded();
 }
        // Case 1 TPF BizFi Pass, Source of income is Full Ownership Practice, FICO >=550, Gross sales >120k and
        //business accepts credit Cards

        // [Given(@"I have completed a application with Full Ownership Practice")]
        public void GivenIHaveCompletedAApplicationWithFullOwnershipPractice()
        {
            Browser.Current.Navigate().GoToUrl(ConfigurationManager.AppSettings["seleniumBaseUrl"]);
            Browser.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
            _CurrentPage = GetInstance <BHGLogin>();
            _CurrentPage.As <BHGLogin>().ClickAutoLogin();
            _CurrentPage = GetInstance <BHGMenu>();
            _CurrentPage.As <BHGMenu>().PractitionerList.Click();
            _CurrentPage.As <BHGMenu>().QuickSearchReset.Click();
            DriverWait.WaitForPageLoaded();
            _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.Clear();
            _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.Clear();
            _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.SendKeys("CECIL");
            _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("MOUTRAY");
            _CurrentPage.As <BHGMenu>().QuickSearchGo.Click();
            _CurrentPage.As <BHGMenu>().GridList.Click();
            //Rename extension method to SwitchWebWindowPage
            WebControlsExtension.SwitchWindowToApplicationPage("#AppV3BHG > table:nth-child(5) > tbody > tr > td > font");
            DriverWait.WaitForPageLoaded();
        }
Esempio n. 5
0
        //Test to cover the Decline Queue status for AMI

        //[Given(@"I have Completed Scoring and AMI Failed")]
        public void GivenIHaveCompletedScoringAndAMIFailed()
        {
            Browser.Current.Navigate().GoToUrl(ConfigurationManager.AppSettings["seleniumBaseUrl"]);
            Browser.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
            _CurrentPage = GetInstance <BHGLogin>();
            _CurrentPage.As <BHGLogin>().ClickAutoLogin();
            _CurrentPage = GetInstance <BHGMenu>();
            _CurrentPage.As <BHGMenu>().PractitionerList.Click();
            _CurrentPage.As <BHGMenu>().QuickSearchReset.Click();
            DriverWait.WaitForPageLoaded();
            _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.Clear();
            _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.Clear();
            _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.SendKeys("Bill");
            _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("Aaalevelg");
            _CurrentPage.As <BHGMenu>().QuickSearchGo.Click();
            _CurrentPage.As <BHGMenu>().GridList.Click(); //---> Find element by text and click, add function
            WebControlsExtension.SwitchWindowToApplicationPage("#AppV3BHG > table:nth-child(5) > tbody > tr > td > font");
            DriverWait.WaitForPageLoaded();
            _CurrentPage = GetInstance <BHGApplicationPage>();
            _CurrentPage.As <BHGApplicationPage>().ClickScoreButton();
            DriverWait.WaitForPageLoaded();
        }
        public void GivenIHaveCompletedAApplicationForSingleGaurantor(String browserName)
        {
            Browser.Current.Navigate().GoToUrl(ConfigurationManager.AppSettings["seleniumBaseUrl"]);
            Browser.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30));
            _CurrentPage = GetInstance <BHGLogin>();
            _CurrentPage.As <BHGLogin>().ClickAutoLogin();
            _CurrentPage = GetInstance <BHGMenu>();
            _CurrentPage.As <BHGMenu>().PractitionerList.Click();
            _CurrentPage.As <BHGMenu>().QuickSearchReset.Click();
            DriverWait.WaitForPageLoaded();
            _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.Clear();
            _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.Clear();
            _CurrentPage.As <BHGMenu>().QuickSearchValueFirstName.SendKeys("Juliet"); //Change Name
            _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("Abijay");  //Change Name
            _CurrentPage.As <BHGMenu>().QuickSearchGo.Click();
            _CurrentPage.As <BHGMenu>().GridList.Click();
            WebControlsExtension.SwitchWindowToApplicationPage("#AppV3BHG > table:nth-child(5) > tbody > tr > td > font");
            DriverWait.WaitForPageLoaded();
            // [Given(@"I have entered My PFS and have no Liabilities")]
            _CurrentPage = GetInstance <BHGApplicationPage>();
            //Update Application to intial Entry for first scoring
            DatabaseHelper.SqlExecuteCommand("Data Source=BHG-COLO-SQ05;" + "Initial Catalog=Vision;" + "Integrated Security=True;",
                                             @" DECLARE @ApplicationNum int = 211553 
            UPDATE tApplication
            SET ApplicationStatus='E'
            WHERE ApplicationNum = @ApplicationNum");//Change application #
            //Clear PFS Assset Fields
            _CurrentPage.As <BHGApplicationPage>().ClearPersonalFinancialStatement();
            //Enter PFS values
            _CurrentPage.As <BHGApplicationPage>().finAssBankAcctsPFS.SendKeys("50000");
            _CurrentPage.As <BHGApplicationPage>().finAssInvestPFS.SendKeys("10000.00");
            _CurrentPage.As <BHGApplicationPage>().finAssREPrimaryPFS.SendKeys("90000.00");
            _CurrentPage.As <BHGApplicationPage>().finAssREOthersPFS.SendKeys("1000000.00");
            _CurrentPage.As <BHGApplicationPage>().finAssOthersPFS.SendKeys("1000000.00");
            _CurrentPage.As <BHGApplicationPage>().finLiaCCPFS.SendKeys("0.00");
            _CurrentPage.As <BHGApplicationPage>().finLiaTaxesPFS.SendKeys("0.00");
            _CurrentPage.As <BHGApplicationPage>().finLiaPersonalLoanPFS.SendKeys("0.00");
            _CurrentPage.As <BHGApplicationPage>().finLiaLOCPFS.SendKeys("0.00");
            _CurrentPage.As <BHGApplicationPage>().finLiaMortPrimaryPFS.SendKeys("0.00");
            _CurrentPage.As <BHGApplicationPage>().finLiaMortOtherPFS.SendKeys("0.00");
            _CurrentPage.As <BHGApplicationPage>().finLiaOtherPFS.SendKeys("0.00");
            _CurrentPage.As <BHGApplicationPage>().salaryAnnualIncome.SendKeys("50000.00");
            _CurrentPage.As <BHGApplicationPage>().rentalAnnualIncome.SendKeys("0.00");
            _CurrentPage.As <BHGApplicationPage>().otherAnnualIncome.SendKeys("5000.00");

            //Clear scoring filters
            DatabaseHelper.SqlExecuteCommand("Data Source=BHG-COLO-SQ05;" + "Initial Catalog=Vision;" + "Integrated Security=True;",
                                             @" DECLARE @ApplicationNum int = 211553 
                          UPDATE sub8900.tApplication8900
                              SET ScreenResultCore = NULL,
                                      PaystubQualified = NULL,
                                              ScreenResultAF = NULL,
                                                  ScreenResultAMI = NULL,
                                                      ScreenResultNewLogic = NULL,
                                                                      SBAQualified = NULL,
                                                      ScreenResultWeekly = NULL,
                                          ScreenResultTPFMessage = NULL,
                                                      DTIfromCBR = NULL,
                                          ScreenResultCreditCard = NULL,
                                              ScreenResultNote = NULL
                          WHERE ApplicationNum = @ApplicationNum
              UPDATE sub8900.tGuarantor8900
                  SET ScreenResultCreditCard = NULL,
              DTIPlain = NULL
              WHERE ApplicationNum = @ApplicationNum");
        }//-TODO update scroing filters