public void UserRegistration(string firstName, string lastName, string email, string password, string gender, string country) { email = email.Replace("_random", Guid.NewGuid().ToString()); FirstNameTextBox.SendKeys(firstName); LastNameTextBox.SendKeys(lastName); EmailTextBox.SendKeys(email); PasswordTextBox.SendKeys(password); foreach (var genderBtn in GenderRadioButton) { var genderValue = genderBtn.GetAttribute("value"); if (genderValue == gender) { genderBtn.Click(); break; } } var countrySelect = new SelectElement(CountrySelectBox); countrySelect.SelectByText(country); DriverWait.Until(ExpectedConditions.ElementToBeClickable(SignupButton)).SendKeys(Keys.Enter); }
//[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(); }
public static void WaitForPageLoad() { var javaScriptExecutor = Driver as IJavaScriptExecutor; Func <IWebDriver, bool> readyCondition = webDriver => javaScriptExecutor.ExecuteScript("return document.readyState").Equals("complete"); DriverWait.Until(readyCondition); }
//[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"); }
public void OpenLoginPage() { var txt = LoginLink.Text; DriverWait.Until(ExpectedConditions.TextToBePresentInElement(LoginLink, "Log")); LoginLink.Click(); }
// [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", "*****@*****.**"); }
/// <summary> /// Login in Souq.com using Facebook Account /// </summary> /// <param name="email"> Facebook email address or telephone number</param> /// <param name="password">Facebook password</param> public void LoginUsingFacebook(string email, string password) { FacebookButton.Click(); DriverWait.Until(ExpectedConditions.UrlContains("facebook.com")); FacebookEmailTextBox.SendKeys(email); FacebookPasswordTextBox.SendKeys(password); FacebookLoginButton.Click(); }
public static void AcceptAlert() { DriverWait.Until(ExpectedConditions.AlertIsPresent()); IAlert alert = Driver.SwitchTo().Alert(); Logger.LogMsg(Severity.WARN, string.Format("There is an alert with text >>> {0}", alert.Text)); alert.Accept(); }
public void SendRecoverEmail(string email) { EmailTextBox.SendKeys(email); SubmitButton.Click(); DriverWait.Until(ExpectedConditions.TextToBePresentInElement(FlashAlert, "An email was sent to you to reset your password.")); Thread.Sleep(10000); }
// [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"); }
public void ParseShouldFailWhenInvalidEnumerationValue() { // Arrange string name = "some invalid enumeration string value"; // Act Action action = () => { DriverWait.Parse(name); }; // Assert action.Should().Throw <InvalidEnumerationException>(); }
public void ParseShouldReturnCorrectValue() { // Arrange string name = DriverWait.Yes.ToString(); // Act Action action = () => { DriverWait.Parse(name); }; // Assert action.Should().Throw <InvalidEnumerationException>(); }
public void ConvertKilowattHoursToNewtonMeters(double kWh, Format format = Format.Decimal) { CelsiusInput.SendKeys(kWh.ToString()); if (format != Format.Decimal) { var formatText = Enum.GetName(typeof(Format), format); new SelectElement(FormatField).SelectByText(formatText); } DriverWait.Until(drv => Answer != null); }
public static IWebElement WaitUntilElementIsClickable(IWebElement element) { try { return(DriverWait.Until(ExpectedConditions.ElementToBeClickable(element))); } catch (UnhandledAlertException) { AcceptAlert(); return(null); } }
//[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(); }
public static IWebElement WaitUntilElementIsVisible(By findElementBy) { try { return(DriverWait.Until(ExpectedConditions.ElementIsVisible(findElementBy))); } catch (UnhandledAlertException) { AcceptAlert(); return(null); } }
//[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(); }
//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(); }
//[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(); }
public UpdateTeamCommandValidator() { RuleFor(x => x.Id).NotEmpty().CustomFault(CustomFaultCode.NotFound, CustomFailures.TeamNotFound); RuleFor(x => x.Name).NotEmpty().ValidationFault(ValidationFailures.TeamNameMandatory); RuleFor(x => x.DriverWait).Custom((elem, context) => { var driverWait = DriverWait.List().SingleOrDefault(x => x.Name == elem); if (driverWait == null) { context.AddValidationFault("DriverWait", ValidationFailures.TeamDriverWaitWrongValue); } }); }
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"); }
/// <summary> /// Login in Souq.com using Amazon Account /// </summary> /// <param name="email"> Amazin email address </param> /// <param name="password">Amazon password</param> public void LoginUsingAmazon(string email, string password) { // Switching to amazon login popup window AmazonButton.Click(); Driver.SwitchTo().Window(Driver.WindowHandles.ToList().Last()); DriverWait.Until(ExpectedConditions.UrlContains("amazon.com")); // Entering Amazon User Credentials AmazonEmailTextBox.SendKeys(email); AmazonPasswordTextBox.SendKeys(password); AmazonLoginButton.Click(); // returning back to Souq.com Login Page Driver.SwitchTo().Window(Driver.WindowHandles.ToList().First()); }
/************************************************************************************************** * //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(); }
// [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'"); }