public void VerifyInconsistencyIncome_NL(int loanamout, string income1, string income2, string mobiledevice, bool verification) { strUserType = "NL"; _driver = _testengine.TestSetup(mobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); try { // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Households); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } PersonalDetailsDataObj _dataObj = new PersonalDetailsDataObj { StreetName = TestData.OverrideCodes.PassAll_NL }; _personalDetails.PopulatePersonalDetails(_dataObj); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); email = _personalDetails.EmailID; // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.SingleDI.Yodlee.UID, TestData.BankDetails.SingleDI.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomeCategDeposit1(TestData.IncomeCategory.PrimaryIncome); // Select Just checking option SelectIncome1Reason(income1); // Select Category _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.PrimaryIncome); //Verify if Reason is requested to specify Assert.IsTrue(_bankDetails.VerifySelectJustCheckingDeposit2IsDisplayed()); // Select Category _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.OtherEmployment); //Verify if Reason is requested to specify Assert.IsFalse(_bankDetails.VerifySelectJustCheckingDeposit2IsDisplayed()); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); System.Threading.Thread.Sleep(2000); // enter sms input as OTP if (loanamout > 2000) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } if (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || verification) { //Click on Launch dashboard _loanSetUpDetails.ClickLoanDashboardManual(); //Click on Final approval _bankDetails.ClickFinalApproval(); //Click on setup _bankDetails.ClickSetup(); } // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); // Select Reason for Spend Less bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless(); if (ReasonPageExists == true) { _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC_164_VerifyGovtIncome81_TwoBankAcc_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } //_personalDetails.PopulatePersonalDetails(); _personalDetails.PersonalDetailsFunction(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.GovtInc48.Yodlee.UID, TestData.BankDetails.GovtInc48.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); //Click on Add Another BAnk Button _bankDetails.ClickAddAnotherBankBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.GovtInc41.Yodlee.UID, TestData.BankDetails.GovtInc41.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Verify unsuccessful message string UnsuccessMsg = "Application unsuccessful"; Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg)); //verify DNQ Message string ActualDNQMessage = "You currently don't qualify for a Nimble loan"; Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage)); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void Employment_Selfemployed_NL(int loanamout, string strmobiledevice, string POL) { strUserType = "NL"; try { _driver = TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, POL); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, POL); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(POL); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(POL); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj(); _personalDetailsData.EmploymentStatus = "Self Employed"; // entering personal details with overwrite values _personalDetails.PopulatePersonalDetails(_personalDetailsData); //Click on No for personal use _personalDetails.ClickNoForPersonalUseBtn(); // Selenium needs to click Continue button again to proceed, else it fails after popping extra questions _personalDetails.ClickPersonaldetailsContinueBtn(); string strval = _personalDetails.GetDNQTxt(); // Verify unsuccessful message string UnsuccessMsg = "Application unsuccessful"; Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg)); //verify DNQ Message string ActualDNQMessage = "You currently don't qualify for a Nimble loan"; Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage)); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC001_VerifyPOL_NL(int loanamout) { // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); // Click on HideShowDebug Button _homeDetails.ClickHideShowDebugBtn(); // Click on PassAllNobs Link _homeDetails.ClickPassAllNobslnk(); // Select Purpose of loan _loanpurposedetails.SelectLoanPurpose(TestData.POL.Eventcosts.Birthdayparty); // Select Loan Value from Slide bar _loanpurposedetails.SelectLoanValue(loanamout); // Enter FirstPOLLoan Amount _loanpurposedetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanpurposedetails.ClickLoanPOLContinueBtn(); // Enter Email Details _personaldetails.EnterEmailTxt(_randomVal.RandomEmail()); // Enter StreetName Details _personaldetails.EnterStreetNameTxt(TestData.OverrideCodes.Approved); // select Employement Status _personaldetails.SelectEmploymentStatusLst(TestData.YourEmployementStatus.FullTime); // select short term loans value as NO _personaldetails.ClickNoShortTermLoanStatusBtn(); // Check Read Privacy and Electronic Authorisation _personaldetails.CheckReadPrivacyBtn(TestData.NewLoaner); // Check Read Credit Guide _personaldetails.CheckReadCreditBtn(TestData.NewLoaner); // Click on Personal Details Continue Button _personaldetails.ClickPersonaldetailsContinueBtn(); // Click on checks out Continue Button _personaldetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.DAGbank.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.DAGbank.UID, TestData.BankDetails.DAGbank.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(TestData.BankDetails.DAGbank.BSB, TestData.BankDetails.DAGbank.AccountNumber, TestData.BankDetails.DAGbank.AccountName); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomeCategoryLst(TestData.IncomeCategory.PrimaryIncome); // Select Just checking option _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickGovtBenefitsOptionLst(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); // enter sms input as OTP _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); // Verify Loan Setup Text displayed _LoanSetUpDetails.VerifyDisplayedText(); // click on Buton Submit _LoanSetUpDetails.ClickSubmitBtn(); // Scrolling the Loan Contract _LoanSetUpDetails.Loancontract(); // Confirming accepting contract _LoanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _LoanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _LoanSetUpDetails.ClickNothanksBtn(); // Click on Loan Dashboard Button _LoanSetUpDetails.ClickLoanDashboard(); }
public void TC079_VerifySTP_D_NL(int loanamount, string strdevice) { strUserType = "NL"; _driver = TestSetup(strdevice); _homedetails = new HomeDetails(_driver, "NL"); _loanpurposedetails = new LoanPurposeDetails(_driver, "NL"); _personaldetails = new PersonalDetails(_driver, "NL"); _bankdetails = new BankDetails(_driver, "NL"); try { _homedetails.ClickApplyBtn(); _homedetails.ClickStartApplictionBtn(); bool hideshow = _homedetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanpurposedetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households); } else { _loanpurposedetails.RequestLoanAmount(loanamount, TestData.POL.Households); } } else { // Select Loan Value from Slide bar _loanpurposedetails.SelectLoanValue(loanamount); //Click on First POL to select _loanpurposedetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanpurposedetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { // Select Purpose of loan _loanpurposedetails.SelectLoanPurpose(TestData.POL.Households); } // Enter FirstPOLLoan Amount _loanpurposedetails.EnterFirstPOLAmountTxt(loanamount.ToString()); // Click on Continue Button _loanpurposedetails.ClickLoanPOLContinueBtn(); } PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj(); TestUtility _testutility = new TestUtility(); _personalDetailsData.StreetName = "At:N Cr:A Id:100 Bs1:P Rr1:A Rr2:D Rjs2:S Rr3:A Bsp:Y"; _personalDetailsData.FirstName = _testutility.RandomString(8); _personaldetails.PopulatePersonalDetails(_personalDetailsData); _personaldetails.ClickCheckoutContinueBtn(); _bankdetails.SelectBankLst(TestData.BankDetails.Dagbank); _bankdetails.BankSelectContinueBtn(); _bankdetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); _bankdetails.ClickAutoContinueBtn(); _bankdetails.BankAccountSelectBtn(); _bankdetails.ClickBankAccountContBtn(); _bankdetails.EnterBankDetailsTxt(); _bankdetails.ClickAcctDetailsBtn(); _bankdetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); _bankdetails.ClickConfirmIncomeBtn(); _bankdetails.SelectOtherDebtRepaymentsOptionBtn(); _bankdetails.SelectDependantsLst(TestData.Dependents.Zero); _bankdetails.ClickConfirmExpensesBtn(); _bankdetails.ClickNoGovtBenefitsbtn(); _bankdetails.ClickAgreeAppSubmitBtn(); _bankdetails.ClickConfirmSummaryBtn(); string strval = _personaldetails.GetDNQTxt(); // Verify unsuccessful message string UnsuccessMsg = "Application unsuccessful"; Assert.IsTrue(_personaldetails.GetUnsuccessMessage().Contains(UnsuccessMsg)); //verify DNQ Message string ActualDNQMessage = "You currently don't qualify for a Nimble loan"; Assert.IsTrue(_personaldetails.GetDNQMessage().Contains(ActualDNQMessage)); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } //finally //{ // _driver.Quit(); // _result.SendTestResultToDb(TestContext.CurrentContext, strMessage, _personaldetails.EmailID, starttime); //} }
public void TC177_Verify_Incorrect_SMS_PIN__NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.TravelHoliday.Airline); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.TravelHoliday.Airline); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.TravelHoliday.Airline); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.TravelHoliday.Airline); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values _personalDetails.PopulatePersonalDetails(); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.InvalidSMSCode); } } //verify Incorrect PIN error message string expectedErrorMsgMobile = "Incorrect PIN. Please try again."; string expectedErrorMsgDesktop = "Incorrect PIN. Please try again"; Thread.Sleep(1000); if (GetPlatform(_driver)) { Assert.AreEqual(_loanSetUpDetails.VerifyIncorrectSMSPin(), expectedErrorMsgMobile); } else { Assert.AreEqual(_loanSetUpDetails.VerifyIncorrectSMSPin(), expectedErrorMsgDesktop); } //Reenter valid SMS PIN _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC106_VerifyingCSVImport_NL(int loanamout, string strmobiledevice) { try { strUserType = "NL"; _driver = _testengine.TestSetup(strmobiledevice); if (_driver != null) { _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values PersonalDetailsDataObj _obj = new PersonalDetailsDataObj(); _obj.Have2SACCLoan = "No"; //_personalDetails.PopulatePersonalDetails(); _personalDetails.PopulatePersonalDetails(_obj); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Induebank.IndueLtd); // Confirm Bank Details _bankDetails.EnterBankDetailsUploadCSV("702389", "123456789", "TestUser"); //Click on BankDetailsContinue button _bankDetails.ClickBankDetailsContinueBtn(); // update bank statement _bankDetails.UpdateBankstatement(); //Click on upload link _bankDetails.ClickUploadLnk(); // FileUpload string projectLoc = Directory.GetCurrentDirectory(); string fileLocation = Path.Combine(projectLoc, "TestData\\BankStatementCSVUpload.csv"); // _bankDetails.FileUpload(fileLocation); _bankDetails.UploadFile(fileLocation); //Click Confirm UploadRBtn _bankDetails.ClickConfirmUploadRBtn(); //Click Upload ContinueBtn _bankDetails.ClickUploadContinueBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option // _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 0) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } } catch (Exception ex) { strMessage += ex.Message; if (_driver != null) { Assert.Fail(ex.Message); } } }
public void TC107_VerifyingTwo_BankAcc_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); string justcheckingoption = "Yes, it will stay the same (or more)"; // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } //_personalDetails.PopulatePersonalDetails(); _personalDetails.PersonalDetailsFunction(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password // _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); // Click on Continue Button //_bankDetails.ClickAutoContinueBtn(); //Click on Add Another BAnk Button //_bankDetails.ClickAddAnotherBankBtn(); // select Bank Name //_bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TwoBankAccounts.Yodlee.UID, TestData.BankDetails.TwoBankAccounts.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose first bank account _bankDetails.BankAccountselectforfirstBS(); // choose second bank account //_bankDetails.BankAccountselectforsecondBS(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "1"); // Select Just checking option for first income category _bankDetails.SelectJustCheckingOption(justcheckingoption, "1"); // Click view transactions link _bankDetails.ClickViewTransactionsBtn(); // validate merged 2 bank statements description Assert.IsTrue(_bankDetails.ValidateTransactionDesc()); // validate merged 2 bank statements amount int totaltransactionsamt = _bankDetails.ValidateTransactionAmount(); // Select second Income Category as PrimaryIncome _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option for first income category _bankDetails.SelectJustCheckingOption(justcheckingoption, "0"); // Enter Other reason for two bank income if (justcheckingoption == "Other (we may contact you)") { _bankDetails.EnterOtherReasonForSpike(TestData.OtherReason); } // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); //Assert the expenses int expensesamount = _bankDetails.ExpensesAmount(); int actualexpensesamount = 777; //726 int actualexpensesamount2 = 718; //depending on time of year, sometimes Everyday Living Expenses value is 718, so need to check for either Assert.IsTrue(expensesamount == actualexpensesamount || expensesamount == actualexpensesamount2); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } if (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || (justcheckingoption == "Other (we may contact you)")) //if (loanamout > 2000 || FinalReviewEnabled == "true" || justcheckingoption == "Other (we may contact you)") { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC077_VerifyAML_Medicare_NL_AML1Reject_AML2Reject(int loanamount, string strdevice) { strUserType = "NL"; _driver = TestSetup(strdevice); HomeDetails _homeDetails = new HomeDetails(_driver, "NL"); LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(driver, "NL"); PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj(); BankDetails _bankDetails = new BankDetails(driver, "NL"); LoanSetUpDetails _loanSetUpDetails = new LoanSetUpDetails(driver, "NL"); try { // Home page _homeDetails.ClickApplyBtn(); _homeDetails.ClickStartApplictionBtn(); // Purpose of Loan page bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmount(loanamount, TestData.POL.Households); } } else { _loanPurposeDetails.SelectLoanValue(loanamount); _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); } _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamount.ToString()); _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // Personal Details page _personalDetailsData.StreetName = "At:N Cr:A Id:0 A2:F Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:0.9999"; //_personalDetailsData.StreetName = "At:N Cr:A Id:0 Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:1"; _personalDetails.PopulatePersonalDetails(_personalDetailsData); _personalDetails.ClickCheckoutContinueBtn(); // Bank Details page _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); _bankDetails.BankSelectContinueBtn(); _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); _bankDetails.ClickAutoContinueBtn(); _bankDetails.BankAccountSelectBtn(); _bankDetails.ClickBankAccountContBtn(); _bankDetails.EnterBankDetailsTxt(); _bankDetails.ClickAcctDetailsBtn(); // Your Income page _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); _bankDetails.ClickConfirmIncomeBtn(); _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // Your Expenses page _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.ClickConfirmExpensesBtn(); _bankDetails.ClickNoGovtBenefitsbtn(); // Your Summary page _bankDetails.ClickAgreeAppSubmitBtn(); _bankDetails.ClickConfirmSummaryBtn(); // Id pages _bankDetails.CheckIdAuthorisationChkbx(); _bankDetails.SelectIdTypeLst("Medicare"); _bankDetails.EnterIdMedicareCardNumberTxt(); _bankDetails.EnterIdMedicareRefNoTxt("1"); _bankDetails.SelectIdMedicareCardColourLst("Green"); _bankDetails.EnterIdMedicareCardNameTxt("Brian123"); _bankDetails.SelectIdMedicareExpiryDateMonthLst("Jul"); _bankDetails.SelectIdMedicareExpiryDateYearLst("2020"); _bankDetails.ClickIdSubmitBtn(); // SMS Verification page //if (loanamount > 2000) //{ // // Enter sms input // if (_bankDetails.VerifySMSOTP()) // _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); //} //Check for oops message string expectedErrorMessage = "Oops. Our system had trouble confirming your identity."; string actualErrorMessage = _bankDetails.getALMErrorMessage(); Assert.AreEqual(expectedErrorMessage, actualErrorMessage); // Member Area page _loanSetUpDetails.Logout(); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } //finally //{ // _driver.Quit(); // _result.SendTestResultToDb(TestContext.CurrentContext, strMessage, _homeDetails.RLEmailID, starttime); //} }
public void TC083_VerifyALM_InternationalPassport_NL_AM1Reject_AML2Reject(int loanamount, string strdevice) { _driver = TestSetup(strdevice, "NL"); HomeDetails _homeDetails = new HomeDetails(_driver, "NL"); LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(driver, "NL"); PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj(); BankDetails _bankDetails = new BankDetails(driver, "NL"); LoanSetUpDetails _loanSetUpDetails = new LoanSetUpDetails(driver, "NL"); try { // Home page _homeDetails.ClickApplyBtn(); _homeDetails.ClickStartApplictionBtn(); // Purpose of Loan page bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmount(loanamount, TestData.POL.Households); } } else { _loanPurposeDetails.SelectLoanValue(loanamount); _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); } _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamount.ToString()); _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // Personal Details page _personalDetailsData.StreetName = "At:N Cr:A Id:0 A2:F Bs1:P Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:0.9999"; _personalDetails.PopulatePersonalDetails(_personalDetailsData); _personalDetails.ClickCheckoutContinueBtn(); // Bank Details page _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); _bankDetails.BankSelectContinueBtn(); _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); _bankDetails.ClickAutoContinueBtn(); _bankDetails.BankAccountSelectBtn(); _bankDetails.ClickBankAccountContBtn(); _bankDetails.EnterBankDetailsTxt(); _bankDetails.ClickAcctDetailsBtn(); // Your Income page _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); _bankDetails.ClickConfirmIncomeBtn(); _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // Your Expenses page _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.ClickConfirmExpensesBtn(); _bankDetails.ClickNoGovtBenefitsbtn(); // Your Summary page _bankDetails.ClickAgreeAppSubmitBtn(); _bankDetails.ClickConfirmSummaryBtn(); // Id pages _bankDetails.CheckIdAuthorisationChkbx(); _bankDetails.SelectIdTypeLst("International Passport"); _bankDetails.EnterIdInternationalPassportNumberTxt(); _bankDetails.SelectIdInternationalPassportCountryLst("UNITED KINGDOM"); _bankDetails.ClickIdSubmitBtn(); // Member Area page // System could not ID person, person added to outbound contact queue to confirm details _loanSetUpDetails.Logout(); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC083_VerifyALM_InternationalPassport_NL_AM1Accept_AML2Reject(int loanamount, string strdevice) { _driver = TestSetup(strdevice); HomeDetails _homeDetails = new HomeDetails(_driver, "NL"); LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(driver, "NL"); PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj(); BankDetails _bankDetails = new BankDetails(driver, "NL"); LoanSetUpDetails _loanSetUpDetails = new LoanSetUpDetails(driver, "NL"); try { // Home page _homeDetails.ClickApplyBtn(); _homeDetails.ClickStartApplictionBtn(); // Purpose of Loan page bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmount(loanamount, TestData.POL.Households); } } else { _loanPurposeDetails.SelectLoanValue(loanamount); _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); } _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamount.ToString()); _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // Personal Details page _personalDetailsData.StreetName = "Cr:A Id:0 A2:S Bs1:P Rr:A Rr2:A Rr3:A He:A Bsp:Y Rmsrv:0.9844"; _personalDetails.PopulatePersonalDetails(_personalDetailsData); _personalDetails.ClickCheckoutContinueBtn(); // Bank Details page _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); _bankDetails.BankSelectContinueBtn(); _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); _bankDetails.ClickAutoContinueBtn(); _bankDetails.BankAccountSelectBtn(); _bankDetails.ClickBankAccountContBtn(); _bankDetails.EnterBankDetailsTxt(); _bankDetails.ClickAcctDetailsBtn(); // Your Income page _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); _bankDetails.ClickConfirmIncomeBtn(); _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // Your Expenses page _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.ClickConfirmExpensesBtn(); _bankDetails.ClickNoGovtBenefitsbtn(); // Your Summary page _bankDetails.ClickAgreeAppSubmitBtn(); _bankDetails.ClickConfirmSummaryBtn(); // Id pages _bankDetails.CheckIdAuthorisationChkbx(); _bankDetails.SelectIdTypeLst("International Passport"); _bankDetails.EnterIdInternationalPassportNumberTxt(); _bankDetails.SelectIdInternationalPassportCountryLst("UNITED KINGDOM"); _bankDetails.ClickIdSubmitBtn(); // SMS Verification page if (loanamount > 2000) { // Enter sms input if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // Application Finished page _bankDetails.ClickLoanDashboardManual(); // Member Area page _bankDetails.ClickFinalApproval(); _bankDetails.ClickSetup(); // Setup Loan page _loanSetUpDetails.ClickSubmitBtn(); // Contract page _loanSetUpDetails.Loancontract(); _loanSetUpDetails.ConfirmAcceptingContract(); _loanSetUpDetails.ClickOnAgreeBtn(); // Nimble Visa Prepaid Card page _loanSetUpDetails.ClickNothanksBtn(); // Contract Signed page _loanSetUpDetails.ClickLoanDashboard(); // Member Area page _loanSetUpDetails.Logout(); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC202_VerifyingCSVImportTransDesc280_NL(int loanamout, string strmobiledevice) { try { strUserType = "NL"; _driver = _testengine.TestSetup(strmobiledevice); if (_driver != null) { _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values PersonalDetailsDataObj _obj = new PersonalDetailsDataObj(); _obj.Have2SACCLoan = "No"; //_personalDetails.PopulatePersonalDetails(); _personalDetails.PopulatePersonalDetails(_obj); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TransDesc280.Yodlee.UID, TestData.BankDetails.TransDesc280.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); strMessage += string.Format("\r\n\t Dag bank Launched"); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } } catch (Exception ex) { strMessage += ex.Message; if (_driver != null) { Assert.Fail(ex.Message); } } }
public void TC078_VerifyAML_DriversLicense_NL_AML1Reject_AML2Accept(int loanamount, string strdevice) { _driver = TestSetup(strdevice); HomeDetails _homeDetails = new HomeDetails(_driver, "NL"); LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(driver, "NL"); PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj(); BankDetails _bankDetails = new BankDetails(driver, "NL"); LoanSetUpDetails _loanSetUpDetails = new LoanSetUpDetails(driver, "NL"); starttime = DateTime.Now; try { // Home page _homeDetails.ClickApplyBtn(); _homeDetails.ClickStartApplictionBtn(); // Purpose of Loan page bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmount(loanamount, TestData.POL.Households); } } else { _loanPurposeDetails.SelectLoanValue(loanamount); _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); } _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamount.ToString()); _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // Personal Details page _personalDetailsData.StreetName = "Cr:A Id:0 A2:S Rr:A Rr2:A Rr3:A He:A Rmsrv:0.9844 Bsp:Y"; //_personalDetailsData.StreetName = "At:N Cr:A Id:0 Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:1"; _personalDetails.PopulatePersonalDetails(_personalDetailsData); _personalDetails.ClickCheckoutContinueBtn(); // Bank Details page _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); _bankDetails.BankSelectContinueBtn(); _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); _bankDetails.ClickAutoContinueBtn(); _bankDetails.BankAccountSelectBtn(); _bankDetails.ClickBankAccountContBtn(); _bankDetails.EnterBankDetailsTxt(); _bankDetails.ClickAcctDetailsBtn(); // Your Income page _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); _bankDetails.ClickConfirmIncomeBtn(); _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // Your Expenses page _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.ClickConfirmExpensesBtn(); _bankDetails.ClickNoGovtBenefitsbtn(); // Your Summary page _bankDetails.ClickAgreeAppSubmitBtn(); _bankDetails.ClickConfirmSummaryBtn(); // Id pages _bankDetails.CheckIdAuthorisationChkbx(); _bankDetails.SelectIdTypeLst("Drivers Licence"); _bankDetails.EnterIdDriversLicenceNameTxt("Brian123"); _bankDetails.SelectIdDriversLicenceStateLst("QLD"); _bankDetails.EnterIdDriversLicenceNumberTxt(); _bankDetails.ClickIdSubmitBtn(); // SMS Verification page if (loanamount > 2000) { // Enter sms input if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamount, "NL"); #region old code //// Application Finished page //_bankDetails.ClickLoanDashboardManual(); //// Member Area page //_bankDetails.ClickFinalApproval(); //_bankDetails.ClickSetup(); //// Setup Loan page //_loanSetUpDetails.ClickSubmitBtn(); //// Contract page //_loanSetUpDetails.Loancontract(); //_loanSetUpDetails.ConfirmAcceptingContract(); //_loanSetUpDetails.ClickOnAgreeBtn(); //// Nimble Visa Prepaid Card page //_loanSetUpDetails.ClickNothanksBtn(); //// Contract Signed page //_loanSetUpDetails.ClickLoanDashboard(); //// Member Area page //_loanSetUpDetails.Logout(); #endregion } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } //finally //{ // _driver.Quit(); // _result.SendTestResultToDb(TestContext.CurrentContext, strMessage, _personalDetails.EmailID, starttime); //} }
public void TC167_Verifying_ANR2_NL(int loanamout, string strmobiledevice, string BankUsername, string BankPwd) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Households); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values _personalDetails.PopulatePersonalDetails(); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(BankUsername, BankPwd); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); //if (loanamout > 2000) //{ // // enter sms input as OTP // if (_bankDetails.VerifySMSOTP()) // _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); //} // Verify unsuccessful message string UnsuccessMsg = "Application unsuccessful"; Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg)); //verify DNQ Message string ActualDNQMessage = "You currently don't qualify for a Nimble loan."; Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage)); #region commented //// Verify ApprovedAmount //Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); //// click on Buton Submit //_loanSetUpDetails.ClickSubmitBtn(); //// Scrolling the Loan Contract //_loanSetUpDetails.Loancontract(); //// Confirming accepting contract //_loanSetUpDetails.ConfirmAcceptingContract(); //// click on I Agree button //_loanSetUpDetails.ClickOnAgreeBtn(); //// click on No thanks Button //_loanSetUpDetails.ClickNothanksBtn(); //// Verify Funded Amount //Assert.IsTrue(_loanSetUpDetails.VerifyFundedAmount(loanamout), " Expected Requested Amount : " + loanamout + ". Observed Funded Amount : " + _loanSetUpDetails.VerifyFundedAmount()); //if (GetPlatform(_driver)) //{ // // Click on To Loan Dashboard Button // _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // // click on More Button from Bottom Menu // _loanSetUpDetails.ClickMoreBtn(); // //Logout // _loanSetUpDetails.Logout(); //} //else //{ // // Click on Loan Dashboard Button // _loanSetUpDetails.ClickLoanDashboard(); // //Logout // _loanSetUpDetails.Logout(); //} #endregion } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC124_VerifyingHasSACCNo_RePayNo_UptoDate_No_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values PersonalDetailsDataObj _obj = new PersonalDetailsDataObj(); _obj.Have2SACCLoan = "No"; //_personalDetails.PopulatePersonalDetails(); _personalDetails.PopulatePersonalDetails(_obj); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.UID, TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Verify Other short-term loans and select POL's _bankDetails.SelectPOLExistingSACC(TestData.POL.Households, TestData.POL.EducationFees); // Select Have you fully repaid previos loan - "No" _bankDetails.SelectFullyRepaidLoanbtn(false); //Select are you uptodate with repayment- "No" _bankDetails.SelectAreyouUpdatewithLoanBtn(false); // click on Confirm SACC continue button _bankDetails.ClickConfirmSACCNamesBtn(); // Verify unsuccessful message string UnsuccessMsg = "Application unsuccessful"; Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg)); //verify DNQ Message string ActualDNQMessage = "You currently don't qualify for a Nimble loan"; Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage)); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC011_VerifyWithMultiplePOL_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); //Go to the homepage and click the start application button _homeDetails.HomeDetailsPage(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMultiplePOLMobile(loanamout, TestData.POL.Eventcosts.Birthdayparty, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmountMultiplePOL(loanamout, TestData.POL.Eventcosts.Birthdayparty, TestData.POL.Households); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt((loanamout / 2).ToString()); //Select click on second purpose of loan _loanPurposeDetails.ClickSelectSecondPurposeBtn(); // Select Second Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.EducationFees); // Enter Second POL Loan Amount _loanPurposeDetails.EnterSecondPOLAmountTxt((loanamout / 2).ToString()); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt((loanamout / 2).ToString()); //Select click on second purpose of loan _loanPurposeDetails.ClickSelectSecondPurposeBtn(); // Select Second Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.EducationFees); // Enter Second POL Loan Amount _loanPurposeDetails.EnterSecondPOLAmountTxt((loanamout / 2).ToString()); } // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values _personalDetails.PopulatePersonalDetails(); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2600) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } #region commented old scenario //// click on Buton Submit //_loanSetUpDetails.ClickSubmitBtn(); // // Scrolling the Loan Contract // _loanSetUpDetails.Loancontract(); // // Confirming accepting contract // _loanSetUpDetails.ConfirmAcceptingContract(); // // click on I Agree button // _loanSetUpDetails.ClickOnAgreeBtn(); // // click on No thanks Button // _loanSetUpDetails.ClickNothanksBtn(); // if (GetPlatform(_driver)) // { // // Click on To Loan Dashboard Button // _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // // click on More Button from Bottom Menu // _loanSetUpDetails.ClickMoreBtn(); // //Logout // _loanSetUpDetails.Logout(); // } // else // { // // Click on Loan Dashboard Button // _loanSetUpDetails.ClickLoanDashboard(); // //Logout // _loanSetUpDetails.Logout(); // } //} //catch (Exception ex) //{ // strMessage += ex.Message; Assert.Fail(ex.Message); //} #endregion }
public void TC122_VerifyingHasSACCNo_RePayNo_UptoDateYes_NimblePay_No_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values PersonalDetailsDataObj _obj = new PersonalDetailsDataObj(); _obj.Have2SACCLoan = "No"; //_personalDetails.PopulatePersonalDetails(); _personalDetails.PopulatePersonalDetails(_obj); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.UID, TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Verify Other short-term loans and select POL's _bankDetails.SelectPOLExistingSACC(TestData.POL.Households, TestData.POL.EducationFees); // Select Have you fully repaid previos loan - "No" _bankDetails.SelectFullyRepaidLoanbtn(false); //Select are you uptodate with repayment- "Yes" _bankDetails.SelectAreyouUpdatewithLoanBtn(true); //Select To use any of this Nimble loan to make these repayments - "NO" _bankDetails.SelectUseNimbletoRepayLoanBtn(false); // click on Confirm SACC continue button _bankDetails.ClickConfirmSACCNamesBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No //_bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // if (loanamout > 2000 && FinalReviewEnabled == "true") if ((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Select Reason for Spend Less bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless(); if (ReasonPageExists == true) { _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC006_DNQRepayAnotherSACCLoan_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Partlyfullyrepayacurrentshorttermloan); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Partlyfullyrepayacurrentshorttermloan); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Partlyfullyrepayacurrentshorttermloan); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Partlyfullyrepayacurrentshorttermloan); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with random values PersonalDetailsDataObj PersonalDetils = _personalDetails.PopulatePersonalDetails(); // Verify unsuccessful message string UnsuccessMsg = "Application unsuccessful"; Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg)); //verify DNQ Message string ActualDNQMessage = "You currently don" + "'" + "t qualify for a Nimble loan."; Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage));//Sorry, you currently don't qualify for a Nimble loan. } catch (Exception ex) { Assert.Fail(ex.Message); strMessage += ex.Message; } }
public void TC005_RequestedApprovedFundedAmount_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Birthdayparty); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Birthdayparty); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Birthdayparty); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Birthdayparty); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values _personalDetails.PopulatePersonalDetails(); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // Verify ApprovedAmount _loanSetUpDetails.VerifySetUpPageDetails(7, loanamout, loanamout, strUserType); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); // Verify Funded Amount Assert.IsTrue(_loanSetUpDetails.VerifyFundedAmount(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Funded Amount : " + _loanSetUpDetails.VerifyFundedAmount()); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC159_VerifyUserwithexistingOneSAACLoan_NL(int loanamout, string strmobiledevice, bool repaid, bool uptodate, bool nimblepay) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Households); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values _personalDetails.PopulatePersonalDetails(); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.OneSAAC.Yodlee.UID, TestData.BankDetails.OneSAAC.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Verify Other short-term loans and select POL's _bankDetails.SelectPOLExistingSACC(TestData.POL.Households); // Select Have you fully repaid previos loan - "repaid" _bankDetails.SelectFullyRepaidLoanbtn(repaid); //Select are you uptodate with repayment- "uptodate" _bankDetails.SelectAreyouUpdatewithLoanBtn(uptodate); if (uptodate) { //Select To use any of this Nimble loan to make these repayments - "nimblepay" _bankDetails.SelectUseNimbletoRepayLoanBtn(nimblepay); } // click on Confirm SACC continue button _bankDetails.ClickConfirmSACCNamesBtn(); if (nimblepay || !uptodate) { // Verify unsuccessful message string UnsuccessMsg = "Application unsuccessful"; Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg)); //verify DNQ Message string ActualDNQMessage = "You currently don't qualify for a Nimble loan"; Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage)); } else { // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No // _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }