// [When(@"I click score the button")] public void WhenIClickScoreTheButton() { _CurrentPage.As <BHGApplicationPage>().ClickScoreButton(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGApplicationPage>().ClickScoreButton(); DriverWait.WaitForPageLoaded(); }
//[Given(@"I have entered My PFS and have Liabilities for Mutliple Gaurantors")] public void GivenIHaveEnteredMyPFSAndHaveLiabilitiesForMutlipleGaurantors() { //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"); //Add Alimony and ChildSupport Payment to first gurantor _CurrentPage.As <BHGApplicationPage>().eAlimonyChildSupDDL.SelectItemByValueFromDDL("1"); _CurrentPage.As <BHGApplicationPage>().AlimonyChildAmt.SendKeys("350.00"); _CurrentPage.As <BHGApplicationPage>().AlimonyChildType.SelectItemByValueFromDDL("1"); _CurrentPage.As <BHGApplicationPage>().ChildSupportAmt.SendKeys("150.00"); //Add Gaurantors to application _CurrentPage.As <BHGApplicationPage>().AddGurantorButton.Click(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGApplicationPage>().CompleteGuarantorNameTwo("Test", "data", "gohere"); _CurrentPage.As <BHGApplicationPage>().CompleteGuarantorMedicalAndIncomeTwo("1", "1", "8011-01", "FL", "1"); _CurrentPage.As <BHGApplicationPage>().CompleteGuarantorPersonalInformationTwo("CEO", "07/11/1980", "9999999", "*****@*****.**"); }
//[Given(@"I have added multiple companies and completed grantor details")] public void GivenIHaveAddedMultipleCompaniesAndCompletedGrantorDetails() { _CurrentPage.As <BHGApplicationPage>().addRelatedCompany.Click(); DriverWait.WaitForPageLoaded(); //Clear company 2 fields _CurrentPage.As <BHGApplicationPage>().secondCompanyFullLegalName.Clear(); _CurrentPage.As <BHGApplicationPage>().secondCoPhoneNumber.Clear(); _CurrentPage.As <BHGApplicationPage>().secondCoDateEstablished.Clear(); _CurrentPage.As <BHGApplicationPage>().secondCoAddress.Clear(); _CurrentPage.As <BHGApplicationPage>().secondCoZipCode.Clear(); _CurrentPage.As <BHGApplicationPage>().secondCompanyFullLegalName.Clear(); _CurrentPage.As <BHGApplicationPage>().secondCoIntGrossSales.Clear(); //Complete company 2 details _CurrentPage.As <BHGApplicationPage>().secondCompanyFullLegalName.SendKeys("Mathis Test Compnay"); _CurrentPage.As <BHGApplicationPage>().secondCoAddress.SendKeys("615 N 31st ave"); _CurrentPage.As <BHGApplicationPage>().secondCoCity.SendKeys("Fort Lauderdale"); _CurrentPage.As <BHGApplicationPage>().secondCoState.SelectItemByValueFromDDL("FL"); _CurrentPage.As <BHGApplicationPage>().secondCoPhoneNumber.SendKeys("9545582626"); _CurrentPage.As <BHGApplicationPage>().secondCoZipCode.SendKeys("33311"); _CurrentPage.As <BHGApplicationPage>().secondCoDateEstablished.SendKeys("12/12/2015"); _CurrentPage.As <BHGApplicationPage>().secondCoBankruptcy10years.SelectItemByValueFromDDL("0"); _CurrentPage.As <BHGApplicationPage>().secondCoOutstandingTaxIrs.SelectItemByValueFromDDL("0"); _CurrentPage.As <BHGApplicationPage>().secondCoTaxPriorYearFiled.SelectItemByValueFromDDL("1"); _CurrentPage.As <BHGApplicationPage>().secondCoIntAcceptCC.SelectItemByValueFromDDL("1"); _CurrentPage.As <BHGApplicationPage>().secondCoIntGrossSales.SendKeys("160000"); _CurrentPage.As <BHGApplicationPage>().saveButton.Click(); DriverWait.WaitForPageLoaded(); }
//[Given(@"I have addded a company and filled out grantor information")] public void GivenIHaveAdddedACompanyAndFilledOutGrantorInformation() { _CurrentPage = GetInstance <BHGApplicationPage>(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGApplicationPage>().guarantorPrimIncSource.SelectItemByValueFromDDL("2"); _CurrentPage.As <BHGApplicationPage>().intCoAcceptCCDDL.SelectItemByValueFromDDL("1"); _CurrentPage.As <BHGApplicationPage>().intCoBankStatementsDDL.SelectItemByValueFromDDL("1"); //Clears program filters 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"); }
// [When(@"I press score")] public void WhenIPressScore() { _CurrentPage.As <BHGApplicationPage>().ClickScoreButton(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGApplicationPage>().VerifyFirstScoreText(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGApplicationPage>().ClickScoreButton(); DriverWait.WaitForPageLoaded(); }
// [Given(@"I have entered My PFS and have no Liabilities for Mutliple Gaurantors")] public void GivenIHaveEnteredMyPFSAndHaveNoLiabilitiesForMutlipleGaurantors() { //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"); //Add Gaurantors to application _CurrentPage.As <BHGApplicationPage>().AddGurantorButton.Click(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGApplicationPage>().CompleteGuarantorNameTwo("Test", "data", "gohere"); _CurrentPage.As <BHGApplicationPage>().CompleteGuarantorMedicalAndIncomeTwo("1", "1", "8011-01", "FL", "1"); _CurrentPage.As <BHGApplicationPage>().CompleteGuarantorPersonalInformationTwo("CEO", "07/11/1980", "9999999", "*****@*****.**"); //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"); }
//[Given(@"I click created a new bhg application")] public void GivenIClickCreatedANewBhgApplication() { 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>(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGMenu>().ViewApplicationsAll.Click(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGMenu>().NewBHGApplciationBtn.Click(); }
//[Given(@"I have created an application for a practitioner")] public void GivenIHaveCreatedAnApplicationForAPractitioner() { //ScenarioContext.Current.Pending(); Browser.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(60)); Browser.Current.Manage().Timeouts().SetPageLoadTimeout(TimeSpan.FromSeconds(60)); //_CurrentPage = GetInstance<BHGLogin>(); //_CurrentPage.As<BHGLogin>().ClickAutoLogin(); Browser.Current.Navigate().GoToUrl("http://*****:*****@192.168.0.42/app/AppV3BHG.vc?vcqs=TransientKey~%60119574%60~ApplicationNum~%60211432%60~c~%60-1097023819"); DriverWait.WaitForPageLoaded(); _CurrentPage = GetInstance <BHGLogin>(); // _CurrentPage = _CurrentPage.As<BHGLogin>().ClickAutoLogin(); }
public void GivenIHaveLoggedIntoVisionAndSelectedAPractitionerFromThePractitionerList(String browserName) { Setup(browserName); IntiateVisionBrowser(); _CurrentPage = GetInstance <BHGLogin>(); //Navigate to Practitioner list and look up applicant _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("Kenneth"); _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("Osier"); _CurrentPage.As <BHGMenu>().QuickSearchGo.Click(); _CurrentPage.As <BHGMenu>().GridList.Click(); _CurrentPage = GetInstance <BHGLeadActivity>(); //Start refactoring this logic DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadActivity>().ClearPractitionerDetails(); _CurrentPage.As <BHGLeadActivity>().FillInPractitionerDetails("Outbound", "*****@*****.**", "9545832223", "615 N 31st Road", "PMA City", "Florida"); _CurrentPage.As <BHGLeadActivity>().ClickOkButton(); _CurrentPage = GetInstance <BHGMenu>(); _CurrentPage.As <BHGMenu>().GridList.Click(); _CurrentPage = GetInstance <BHGLeadActivity>(); //Add page wait for refresh DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadActivity>().CreateActivity.Click(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadActivity>().SelectCampaignLookup("21*1"); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadActivity>().SelectDisposition("59"); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadActivity>().SelectActivityDirection("0"); DriverWait.WaitForPageLoaded(); _CurrentPage = _CurrentPage.As <BHGLeadActivity>().ClickCreateOppButton(); _CurrentPage.As <BHGLeadActivity>().CreateActivity.Click(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadActivity>().SelectCampaignLookup("21*1"); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadActivity>().SelectDisposition("59"); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadActivity>().SelectActivityDirection("0"); DriverWait.WaitForPageLoaded(); _CurrentPage = _CurrentPage.As <BHGLeadOpportunityPage>().ClickCreateAppButton(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGLeadOpportunityPage>().SelectSolePropDDL("0"); _CurrentPage.As <BHGLeadOpportunityPage>().SelectConsumerAppDDL("0"); _CurrentPage.As <BHGLeadOpportunityPage>().SelectInsuranceAppDDL("0"); _CurrentPage.As <BHGApplicationPage>().IsAt(); }
//[Then(@"the result should pass for AMI and New logic")] public void ThenTheResultShouldPassForAMIAndNewLogic() { //Checks the Program Filter results in Database var conn = DatabaseHelper.ConnectionManager.GetSqlConnection(); Assert.IsTrue(DatabaseHelper.AssertDatabaseResults(conn, @"IF EXISTS (SELECT * FROM sub8900.tApplication8900 WHERE ApplicationNum =211553 and ScreenResultCore =1 and isnull( PaystubQualified ,0) = 0 and ScreenResultAF= 0 and ScreenResultAMI =1 and ScreenResultNewLogic =1 and isnull(SBAQualified ,0)=0 and ScreenResultWeekly =0 and ScreenResultTPFMessage ='BIZFI - Pass' and ScreenResultCreditCard =1) BEGIN PRINT 'Pass' END ELSE BEGIN PRINT'FAIL'END ")); _CurrentPage.As <BHGApplicationPage>().deleteSecondCompanyInfo.Click(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGApplicationPage>().saveButton.Click(); }
//Go to Vision Created loan application //[Given(@"I have created loan application")] public void GivenIHaveCreatedLoanApplication() { 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>(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGMenu>().ViewApplicationsAll.Click(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("222680");//This is for the application Number _CurrentPage.As <BHGMenu>().QuickSearchGo.Click(); }
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"); }
/************************************************************************************************** * //This test is for Call 1 , with Fico 650< **************************************************************************************************/ public void GivenIScoreBusinessApp650ThenCallOneExecutes(String browserName) { Setup("chrome"); Browser.Current.Navigate().GoToUrl(ConfigurationManager.AppSettings["seleniumBaseUrl"]); //todo Browser.Current.Manage().Timeouts().ImplicitlyWait(TimeSpan.FromSeconds(30)); //todo _CurrentPage = GetInstance <BHGLogin>(); _CurrentPage.As <BHGLogin>().ClickAutoLogin(); _CurrentPage = GetInstance <BHGMenu>(); _CurrentPage.As <BHGMenu>().goToApplciation(); _CurrentPage.As <BHGApplicationPage>().ClearTextGuarantorFields(); _CurrentPage.As <BHGApplicationPage>().CompleteApplicationEntry("CallOneBusiness650<"); _CurrentPage.As <BHGApplicationPage>().ClickScoreButton(); DriverWait.WaitForPageLoaded(); //Assert filter results //use after intial score to put app back to intial entry, change db connection,use for test cleanup to reset app _CurrentPage.As <BHGApplicationPage>().resetVisionApplicationToInitialEntry(); }
/**************************************************************************************************************************************************************************************** * //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(); }
// [Given(@"I have added a company and filled out grantor information")] public void GivenIHaveAddedACompanyAndFilledOutGrantorInformation() { _CurrentPage = GetInstance <BHGApplicationPage>(); _CurrentPage.As <BHGApplicationPage>().guarantorFirstName.Clear(); _CurrentPage.As <BHGApplicationPage>().guarantorLastName.Clear(); _CurrentPage.As <BHGApplicationPage>().guarantorSSN.Clear(); _CurrentPage.As <BHGApplicationPage>().guarantorAddress1.Clear(); _CurrentPage.As <BHGApplicationPage>().guarantorBirthdate.Clear(); _CurrentPage.As <BHGApplicationPage>().guarantorCity.Clear(); _CurrentPage.As <BHGApplicationPage>().guarantorPostalCode.Clear(); _CurrentPage.As <BHGApplicationPage>().CompleteGuarantorPersonalInformation("President", "07/11/1980", "8666794657", "*****@*****.**"); _CurrentPage.As <BHGApplicationPage>().CompleteGuarantorAddress("7550 CENTER RIDGE RD ", "WILBURN", "ARIZONA", "72179"); _CurrentPage.As <BHGApplicationPage>().intCoPriorSales.Clear(); _CurrentPage.As <BHGApplicationPage>().intCoPriorSales.SendKeys("125000"); _CurrentPage.As <BHGApplicationPage>().guarantorPrimIncSource.SelectItemByValueFromDDL("1"); _CurrentPage.As <BHGApplicationPage>().guarantorSecIncSource.SelectItemByValueFromDDL("1"); _CurrentPage.As <BHGApplicationPage>().intCoAcceptCCDDL.SelectItemByValueFromDDL("1"); //Clears program filters 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"); 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(); }
// [Then(@"the result Should Generate a DTI single Gaurantor with Liabilities")] public void ThenTheResultShouldGenerateADTISingleGaurantorWithLiabilities() { //Checking for DTI results on Dti Factor table after first scoring var conn = DatabaseHelper.ConnectionManager.GetSqlConnection(); Assert.IsTrue(DatabaseHelper.AssertDatabaseResults(conn, @"IF EXISTS (SELECT * FROM dtifactor WHERE ApplicationNumber = 211553 and GuarantorNumber = 1 and Dti = 0.01) BEGIN PRINT 'Pass' END ELSE BEGIN PRINT'FAIL'END ")); //Change AlimonyChildAmt + ChildSupportAmt and complete second scoring _CurrentPage.As <BHGApplicationPage>().AlimonyChildAmt.Clear(); _CurrentPage.As <BHGApplicationPage>().AlimonyChildAmt.SendKeys("150.00"); _CurrentPage.As <BHGApplicationPage>().ChildSupportAmt.Clear(); _CurrentPage.As <BHGApplicationPage>().ChildSupportAmt.SendKeys("50.00"); _CurrentPage.As <BHGApplicationPage>().ClickScoreButton(); DriverWait.WaitForPageLoaded(); //Checking for DTI results on Dti Factor table after first scoring Assert.IsTrue(DatabaseHelper.AssertDatabaseResults(conn, @"IF EXISTS (SELECT * FROM dtifactor WHERE ApplicationNumber = 211553 and GuarantorNumber = 1 and Dti = 0.01) BEGIN PRINT 'Pass' END ELSE BEGIN PRINT'FAIL'END ")); //Clean up DTI factor table after scoring DatabaseHelper.SqlExecuteCommand("Data Source=BHG-COLO-SQ05;" + "Initial Catalog=Vision;" + "Integrated Security=True;", @"Delete from dtifactor where ApplicationNumber='211553'"); }
//[Given(@"I have been intitial declined in the last twelve months")] public void GivenIHaveBeenIntitialDeclinedInTheLastTwelveMonths() { //Initial Decline application 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>(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGMenu>().ViewApplicationsAll.Click(); DriverWait.WaitForPageLoaded(); _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.Clear(); _CurrentPage.As <BHGMenu>().QuickSearchValueLastName.SendKeys("216885");//This is for the application Number the Core declined status _CurrentPage.As <BHGMenu>().QuickSearchGo.Click(); _CurrentPage.As <BHGMenu>().GridListGuarantor.Click(); _CurrentPage = GetInstance <BHGLeadActivity>(); _CurrentPage.As <BHGLeadActivity>().CreateActivity.Click(); _CurrentPage.As <BHGLeadActivity>().CampaignLookup.SelectItemByValueFromDDL("19*1"); _CurrentPage.As <BHGLeadActivity>().Disposition.SelectItemByValueFromDDL("59"); _CurrentPage.As <BHGLeadActivity>().CreateOpporntunityButton.Click(); }
//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(); }
}//-TODO update scroing filters //[When(@"I click score")] public void WhenIClickScore() { //Click to score application after changes _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
//[When(@"I click score button to score the vision application")] public void WhenIClickScoreButtonToScoreTheVisionApplication() { //Click scoring _CurrentPage.As <BHGApplicationPage>().ClickScoreButton(); DriverWait.WaitForPageLoaded(); }
public void IsAt() { //DriverWait.wait.Until(ExpectedConditions.ElementIsVisible(By.ClassName("screentitle"))); DriverWait.WaitForPageLoaded(); Assert.IsTrue(appStatusDDL.Displayed); }