public void TC123_VerifyingHasSACCNo_RePayNo_UptoDateYes_NimblePay_Yes_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 - "Yes" _bankDetails.SelectUseNimbletoRepayLoanBtn(true); // 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 Employment_Selfemployed_RL(int loanamout, string strmobiledevice, string POL) { strUserType = "RL"; try { _driver = TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); // Login with existing user _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); // Click on Request Money Button _homeDetails.ClickRequestMoneyBtn(); //Click on Start Application Button _homeDetails.ClickExistinguserStartApplictionBtn(); // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValueRL(loanamout); //Click on Select First POL Lst _loanPurposeDetails.ClickSelectFirstPurposeBtn(); // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeRL(POL); // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtnRL(); // select Employement Status _personalDetails.SelectEmploymentStatusLst(TestData.YourEmployementStatus.SelfEmployed); // Click yes for personal use _personalDetails.ClickYesForPersonalUseBtn(); // select short term loans value as NO _personalDetails.ClickNoShortTermLoanStatusBtn(); // Check Read Privacy and Electronic Authorisation _personalDetails.CheckReadPrivacyBtn(TestData.ReturnerLoaner); // Check Read Credit Guide _personalDetails.CheckReadCreditBtn(TestData.ReturnerLoaner); if (GetPlatform(_driver)) { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsContinueBtnRLMobile(); } else { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsRequestBtnRLDesktop(); // Click on checks out Continue Button _personalDetails.ClickAutomaticVerificationBtn(); } // 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(); // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC002_EmploymentStatus_NL(int loanamout, string strmobiledevice) { strMessage += string.Format("\r\n\t " + TestContext.CurrentContext.Test.Name + " Starts"); 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.RentBondRelocation); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.RentBondRelocation); } } 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.RentBondRelocation); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.RentBondRelocation); } // 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(); strMessage += string.Format("\r\n\t Ends"); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); strMessage += string.Format("\r\n\t Ends"); } } 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 TC_130_NoTransactionOtherAccount_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; try { _driver = TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); //Go to the homepage and click the start application button and then the Request money button _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Households); //Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFunction_RL(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, TestData.OverrideCodes.PassAll_RL); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.NoTranstFourDays.Yodlee.UID, TestData.BankDetails.NoTranstFourDays.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(); // Choose reason for no transactions bool notrans = _bankDetails.NoTransaction(TestData.NoTransactionReasons.Usinganother); Assert.IsTrue(notrans, "Notransaction page not appeared"); // 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(); //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Application went to manual approval"); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); //_loanSetUpDetails.WaitForLoanSetUpPage(); if (GetPlatform(_driver)) { // click on Button Submit _loanSetUpDetails.ClickSubmitBtn(); // Click on Bank Account to transfer _bankDetails.ClicksixtyMinuteButton(); // click on sublit-payment Button _bankDetails.ClickSubmitPaymentButton(); } else { // Click on Bank Account to transfer _bankDetails.ClicksixtyMinuteButton(); // 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 TC109_VerifyClosingSite_SetUpPage_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); // Create new debug client _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); // Member Area - click Request Money _homeDetails.ClickRequestMoneyBtn(); // Member Area - Let's Get Started _homeDetails.ClickExistinguserStartApplictionBtn(); // Purpose of Loan page _loanPurposeDetails.SelectLoanValueRL(loanamout); _loanPurposeDetails.ClickSelectFirstPurposeBtn(); _loanPurposeDetails.SelectLoanPurposeRL(TestData.POL.Homerepairsorimprovements); _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); _loanPurposeDetails.ClickLoanPOLContinueBtnRL(); // Personal Details page _personalDetails.SelectEmploymentStatusLst(TestData.YourEmployementStatus.FullTime); _personalDetails.ClickNoShortTermLoanStatusBtn(); _personalDetails.CheckReadPrivacyBtn(TestData.ReturnerLoaner); _personalDetails.CheckReadCreditBtn(TestData.ReturnerLoaner); if (GetPlatform(_driver)) { // Mobile Personal Details Continue button _personalDetails.ClickPersonaldetailsContinueBtnRLMobile(); } else { // Desktop Personal Details Continue button _personalDetails.ClickPersonaldetailsRequestBtnRLDesktop(); _personalDetails.ClickAutomaticVerificationBtn(); } // 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(); // Your Expenses page _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.ClickConfirmExpensesBtn(); _bankDetails.ClickNoGovtBenefitsbtn(); _bankDetails.ClickAgreeAppSubmitBtn(); _bankDetails.ClickConfirmSummaryBtn(); // Loan Setup page // Trigger marketing survey by clicking 'Your Dashboard' link Thread.Sleep(3000); // need this otherwise we try to load the wrong survey _homeDetails.ClickDesktopYourDashboardLnk(); Thread.Sleep(1000); // need this otherwise we won't close the survey correctly _homeDetails.ClickMarketSurveyCloseBtn(); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void VerifyInconsistencyIncome_RL(int loanamout, string income1, string income2, string mobiledevice, bool verification) { strUserType = "RL"; _driver = _testengine.TestSetup(mobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); try { // Login with existing user _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); email = _homeDetails.RLEmailID; // Click on Request Money Button _homeDetails.ClickRequestMoneyBtn(); //Click on Start Application Button _homeDetails.ClickExistinguserStartApplictionBtn(); // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValueRL(loanamout); //Click on Select First POL Lst _loanPurposeDetails.ClickSelectFirstPurposeBtn(); // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeRL(TestData.POL.Homerepairsorimprovements); // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtnRL(); // 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.ReturnerLoaner); // Check Read Credit Guide _personalDetails.CheckReadCreditBtn(TestData.ReturnerLoaner); if (GetPlatform(_driver)) { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsContinueBtnRLMobile(); } else { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsRequestBtnRLDesktop(); // Click on checks out Continue Button _personalDetails.ClickAutomaticVerificationBtn(); } // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.IncosIncome_TC017.Yodlee.UID, TestData.BankDetails.IncosIncome_TC017.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); // Select Just checking option SelectIncome2Reason(income2); // 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 the application goes to manual verification then approving from Final Approval if (verification) { //Click on Launch dashboard _bankDetails.ClickLoanDashboardManual(); //Click on Final approval _bankDetails.ClickFinalApproval(); //Click on setup _bankDetails.ClickSetup(); } if (GetPlatform(_driver)) { // click on Button Submit _loanSetUpDetails.ClickSubmitBtn(); // Click on Bank Account to transfer _bankDetails.ClicksixtyMinuteButton(); // click on sublit-payment Button _bankDetails.ClickSubmitPaymentButton(); } else { // Click on Bank Account to transfer _bankDetails.ClicksixtyMinuteButton(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Select Reason for Spend Less bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless(); if (ReasonPageExists == true) { _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperservice); } // 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 TC074_Verifyretain_UnfinishedApplication_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"); //Go to the homepage and click the start application button _homeDetails.HomeDetailsPage(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households); //populate the personal details and proceed PersonalDetailsDataObj _obj = _personalDetails.PersonalDetailsFunction(); emal = _personalDetails.EmailID; // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); //---------------------------------------------------------------------------- _driver.Quit(); _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"); _homeDetails.ClickLoginBtn(); //TODO _homeDetails.ReLoginUser(_obj.Email, "password"); //Verify Verify Button enabled on dasboard screen Assert.IsTrue(_loanSetUpDetails.VerifyVerifyBtn(), "Verify button is not visible"); //TODO _loanSetUpDetails.ClickVerifyBtn(); //---------------------------------------------------------------------------- // 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 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 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 TC210_Verify_Prefail_NewLoan(int loanamout, string strmobiledevice) { starttime = DateTime.Now; strMessage = string.Format("\r\n\t " + TestContext.CurrentContext.Test.Name + " Starts"); 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(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Eventcosts.Anniversary); //populate the personal details and proceed PersonalDetailsDataObj _obj = _personalDetails.PersonalDetailsFunction(); 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.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(); 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); //Relogin with same user to check visibility of reschedule or make a repayment button _homeDetails.ReLoginUser(_obj.Email, "password"); Thread.Sleep(2000); //Check availability of make a payment button Assert.IsFalse(_homeDetails.verifyMakeaPaymentBtn(), "make a payment button"); //Check reschedule button Assert.IsFalse(_bankDetails.verifyRescheduleBtn(), "Reschedule button"); if (GetPlatform(_driver)) { // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC074_Verifyretain_UnfinishedApplication_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); string strEmailId = string.Empty; // Login with existing user _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.ReturnerDagBankstaging); email = _homeDetails.RLEmailID; // Click on Request Money Button _homeDetails.ClickRequestMoneyBtn(); //Click on Start Application Button _homeDetails.ClickExistinguserStartApplictionBtn(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Households); string streetname = "At:N Cr:A Id:100 Rr1:A Rr2:A Rr3:A Rr:A Rt:8 Rmsrv:0.9999"; //Edit the personal details and change the Rmsrv Code strEmailId = _personalDetails.PersonalDetailsFunction_Skipbanklogin(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, streetname); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); if (bsAutoRefresh) { // 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(); //---------------------------------------------------------------------------- //LogOut _driver.Quit(); _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); _homeDetails.ClickLoginBtn(); _homeDetails.LoginLogoutUser(strEmailId, "password"); //Verify Verify Button enabled on dasboard screen Assert.IsTrue(_loanSetUpDetails.VerifyVerifyBtn(), "Verify button is not visible"); // click on verify button _loanSetUpDetails.ClickVerifyBtn(); // Choose reason for no transactions //bool notrans = _bankDetails.NoTransaction(TestData.NoTransactionReasons.Usingcash); //Assert.IsTrue(notrans, "No transaction page not appeared"); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // 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); } }
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 TC138_YourExpenses_StatedValues_Lower_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"); // Home page _homeDetails.HomeDetailsPage(); // Purpose of Loan page _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households); // Personal Details page _personalDetails.PersonalDetailsFunction(); // Bank 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(); // Your Expenses page _bankDetails.EnterExpenseEverydayLivingTxt("500"); _bankDetails.EnterExpenseOtherDebtRepaymentsTxt("50"); _bankDetails.EnterExpenseMortgageTxt("800"); _bankDetails.EnterExpenseLargeOngoingTxt("200"); _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.ClickConfirmExpensesBtn(); // Your Summary page Assert.IsTrue(_bankDetails.CompareSummaryLivingExpensesTxt("500.00")); Assert.IsTrue(_bankDetails.CompareSummaryOtherDebtTxt("50.00")); Assert.IsTrue(_bankDetails.CompareSummaryRentMortgageTxt("800.00")); Assert.IsTrue(_bankDetails.CompareSummaryLargeOngoingBillsTxt("200.00")); _bankDetails.ClickNoGovtBenefitsbtn(); _bankDetails.ClickAgreeAppSubmitBtn(); _bankDetails.ClickConfirmSummaryBtn(); // SMS Pin page (if applicable) 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); } }
public void TC138_YourExpenses_StatedValues_Lower_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); try { /// Generate debug client and log in _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); // Purpose of Loan page _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Insurance); // Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFunction_RL(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, TestData.OverrideCodes.PassAll_RL); // Bank 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(); // Your Expenses page _bankDetails.EnterExpenseEverydayLivingTxt("500"); _bankDetails.EnterExpenseOtherDebtRepaymentsTxt("50"); _bankDetails.EnterExpenseMortgageTxt("800"); _bankDetails.EnterExpenseLargeOngoingTxt("200"); _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.ClickConfirmExpensesBtn(); // Your Summary page Assert.IsTrue(_bankDetails.CompareSummaryLivingExpensesTxt("500.00")); Assert.IsTrue(_bankDetails.CompareSummaryOtherDebtTxt("50.00")); Assert.IsTrue(_bankDetails.CompareSummaryRentMortgageTxt("800.00")); Assert.IsTrue(_bankDetails.CompareSummaryLargeOngoingBillsTxt("200.00")); _bankDetails.ClickNoGovtBenefitsbtn(); _bankDetails.ClickAgreeAppSubmitBtn(); _bankDetails.ClickConfirmSummaryBtn(); // Set Up Loan page 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 _loanSetUpDetails.ClickSetup(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //ClickLoanDashboard(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _loanSetUpDetails.ClickSetup(); } } if (GetPlatform(_driver)) { _loanSetUpDetails.ClickSubmitBtn(); // _bankDetails.ClicksixtyMinuteButton(); _bankDetails.ClickSubmitPaymentButton(); } else { // _bankDetails.ClicksixtyMinuteButton(); _loanSetUpDetails.ClickSubmitBtn(); } // Loan Contract page _loanSetUpDetails.Loancontract(); _loanSetUpDetails.ConfirmAcceptingContract(); _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 TC081_VerifyingFraudSuspiciousInvalidBSBandPostcode_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); //Go to the homepage and click the start application button and then the Request money button _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.ReturnerDagBankstaging); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Households); // Fetching First Name string Firstname = _loanPurposeDetails.GetFirstName(); //Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFraudBSB_RL(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, TestData.OverrideCodes.PassAll_RL); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); if (bsAutoRefresh) { // 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.EnterInvalidBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); //verify DNQ Screen Assert.IsTrue(_personalDetails.GetDNQTxt().Contains("Sorry " + Firstname)); //verify DNQ Message string ActualDNQMessage = "We're sorry, you didn't qualify for a Nimble loan today."; Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage)); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC062_VerifySpik_Annual_DI_NoOldJob_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice, "NL"); _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(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households); // 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.Spike_DI.Yodlee.UID, TestData.BankDetails.Spike_DI.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, "1"); //Verify Just Checking Option is visisble Assert.IsTrue(_bankDetails.VerifySpikeQuestionText("We've identified that the following transaction is higher than normal.")); //Verify if its is OOC question triggered for the right amount Assert.AreEqual("$3,000.00", _bankDetails.GetSpikeTransactionAmountTxt()); //Verify if its is OOC question triggered for the right Date Assert.AreEqual("Salary ABC holdings", _bankDetails.GetSpikeTransactionDescriptionTxt()); //Select reason _bankDetails.SelectReasonforSpikequestion("Annual bonus"); //Verify II income _bankDetails.SelectJustCheckingDeposit1(TestData.ConfirmIncomeConsistency.No); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // 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); } } //Wait for the Loan setup Page //_loanSetUpDetails.WaitForLoanSetUpPage(); bool val = _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); Assert.IsTrue(val, "Requested, Apporved and Funded Amount are not the Same"); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC_162_VerifyGovtIncome41_AnswerTrue_RL(int loanamout, int approvedamt, string BankUID, string BankPWD, string mobiledevice) { try { strUserType = "RL"; _driver = TestSetup(mobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); //Go to the homepage and click the start application button and then the Request money button _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Households); string streetname = "At:N Cr:A Id:100 Rr1:A Rr2:A Rr3:A Rr:A Rt:8 Rmsrv:0.9999"; //Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFunction_RL(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, streetname); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(BankUID, BankPWD); // 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)); #region commented old scenario //// Confirm Bank Details //_bankDetails.EnterBankDetailsTxt(); //// Click on Confirm account details Continue Button //_bankDetails.ClickAcctDetailsBtn(); //// Select Category //_bankDetails.SelectIncomeCategoryLst(TestData.IncomeCategory.PrimaryIncome); //// 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 Yes //_bankDetails.ClickYesGovtBenefitsbtn(); //// click on Agree that information True //_bankDetails.ClickAgreeAppSubmitBtn(); //// click on confirm Submit button //_bankDetails.ClickConfirmSummaryBtn(); ////Get the approved loan amount value //int approvedAmount = _loanSetUpDetails.GetApprovedamount(); //// Verify ApprovedAmount //Assert.AreEqual(approvedamt, approvedAmount, "Incorrect values" + approvedamt + " - " + approvedAmount); //if (GetPlatform(_driver)) //{ // // click on Button Submit // _loanSetUpDetails.ClickSubmitBtn(); // // Click on Bank Account to transfer // _bankDetails.ClicksixtyMinuteButton(); // // click on sublit-payment Button // _bankDetails.ClickSubmitPaymentButton(); //} //else //{ // // Click on Bank Account to transfer // _bankDetails.ClicksixtyMinuteButton(); // // click on Buton Submit // _loanSetUpDetails.ClickSubmitBtn(); //} //if (loanamout > 2000) //{ // _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperservice); //} //// 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(); //Assert.AreEqual(approvedAmount, _loanSetUpDetails.VerifyFundedAmount(), "Aprroved amount greater than funded amount"); //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 TC014_VerifyYestoTwoSACC_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); //Go to the homepage and click the start application button and then the Request money button _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); //Click on Select First POL Lst _loanPurposeDetails.ClickSelectFirstPurposeBtn(); // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeRL(TestData.POL.Eventcosts.Birthdayparty); // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValueRL(loanamout); // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtnRL(); // select Employement Status _personalDetails.SelectEmploymentStatusLst(TestData.YourEmployementStatus.FullTime); // select short term loans value as YES _personalDetails.ClickYesShortTermLoanStatusBtn(); // Check Read Privacy and Electronic Authorisation _personalDetails.CheckReadPrivacyBtn(TestData.ReturnerLoaner); // Check Read Credit Guide _personalDetails.CheckReadCreditBtn(TestData.ReturnerLoaner); if (GetPlatform(_driver)) { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsContinueBtnRLMobile(); } else { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsRequestBtnRLDesktop(); // Click on checks out Continue Button _personalDetails.ClickAutomaticVerificationBtn(); } // 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 - "Yes" _bankDetails.SelectFullyRepaidLoanbtn(true); // 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(); // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
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 { _loanPurposeDetails.SelectPOLAndAmount(loanamout, TestData.POL.Households); } PersonalDetailsDataObj _dataObj = new PersonalDetailsDataObj(); _dataObj.StreetName = TestData.OverrideCodes.PassAll_RL; _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.IncosIncome_TC017.Yodlee.UID, TestData.BankDetails.IncosIncome_TC017.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); // Select Just checking option SelectIncome2Reason(income2); // 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 the application goes to manual verification then approving from Final Approval if (verification) { //Click on Launch dashboard _bankDetails.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 TC014_VerifyYestoTwoSACC_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"); //Go to the homepage and click the start application button _homeDetails.HomeDetailsPage(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Eventcosts.Anniversary); // entering personal details with overwrite values PersonalDetailsDataObj _obj = new PersonalDetailsDataObj(); _obj.Have2SACCLoan = "Yes"; //_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 - "Yes" _bankDetails.SelectFullyRepaidLoanbtn(true); // 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 > 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 TC_164_VerifyGovtIncome81_TwoBankAcc_NL(int loanamout, string strmobiledevice) { try { strUserType = "RL"; _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); //Go to the homepage and click the start application button and then the Request money button _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Households); string streetname = "At:N Cr:A Id:100 Rr1:A Rr2:A Rr3:A Rr:A Rt:8 Rmsrv:0.9999"; //Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFunction_RL(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, streetname); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.GovtInc81.Yodlee.UID, TestData.BankDetails.GovtInc81.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.GovtInc81.Yodlee.UID, TestData.BankDetails.GovtInc81.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 TC032_ApplyLoanwithRepaymentDateHighest_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); try { //Go to the homepage and click the start application button and then the Request money button _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.ReturnerDagBankstaging); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Households); //Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFunction_Skipbanklogin(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, TestData.OverrideCodes.PassAll_RL); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); if (bsAutoRefresh) { // 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(); // Choose reason for no transactions //bool notrans = _bankDetails.NoTransaction(TestData.NoTransactionReasons.Usingcash); //Assert.IsTrue(notrans, "Notransaction page not appeared"); // 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 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) { if (GetPlatform(_driver)) { if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } //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 _loanSetUpDetails.ClickSetup(); } else { if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _loanSetUpDetails.ClickSetup(); } } string RepaymentDateThen = _loanSetUpDetails.GetfirstrepayFrequencyDate(); _loanSetUpDetails.RepaymentDateHighest(); string RepaymentDateNow = _loanSetUpDetails.GetfirstrepayFrequencyDate(); Assert.AreNotEqual(RepaymentDateThen, RepaymentDateNow, "Repayment date unchanged even after the slider is moved to highest date"); double RepaymentAmountNow = _loanSetUpDetails.getRepAmtInTableMiddle(); _loanSetUpDetails.ClickDetailedRepaymentSchedule(); string[,] details = _loanSetUpDetails.Getrepaymentdetails(); double lastrepay = Convert.ToDouble(details[details.GetLength(0) - 1, 1]); DateTime startdt = Convert.ToDateTime(RepaymentDateNow); if (loanamout > 2000) { _loanSetUpDetails.CalcluateSolver(loanamout, startdt, 7, Convert.ToDouble(details[0, 1]), details.GetLength(0), lastrepay); } else { _loanSetUpDetails.CalculateSAAC(loanamout, 7, details); } // 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 TC200_Verifying_Calculator_Duration_NL(int loanamout, string strmobiledevice) { starttime = DateTime.Now; strMessage = string.Format("\r\n\t " + TestContext.CurrentContext.Test.Name + " Starts"); strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _loanCalculatorDetails = new LoanCalculatorDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); ResultDbHelper _resul = new ResultDbHelper(); // TestContext _testcontext; strMessage += string.Format("\r\n\t Browser Launched"); //Click on Apply Button _homeDetails.ClickApplyBtn(); // Validating ONline calculator Visibility if (calculatorIsEnabled == "true") { Assert.IsTrue(_loanCalculatorDetails.OnlineCalculatorVisibility(), "Expected Visibility of Online Calculator"); } //Selecting the loan amount in calculator and verify returned values on calculator _loanCalculatorDetails.RequestLoanAmountDurationCalculation(loanamout); //Click on Start application _homeDetails.ClickStartApplictionBtn(); // select POL and Amount _loanCalculatorDetails.SelectPOLandAmount(loanamout, TestData.POL.Households); // 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(); 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 set up page 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 _loanSetUpDetails.ClickSetup(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _loanSetUpDetails.ClickSetup(); } } // 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(); strMessage += string.Format("\r\n\t Ends"); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); strMessage += string.Format("\r\n\t Ends"); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void Employment_Contractor_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.RentBondRelocation); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.RentBondRelocation); } } 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.RentBondRelocation); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.RentBondRelocation); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj(); _personalDetailsData.EmploymentStatus = "Contractor"; // entering personal details with overwrite values _personalDetails.PopulatePersonalDetails(_personalDetailsData); // 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 final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC_130_NoTransactionOtherAccount_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(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households); //populate the personal details and proceed _personalDetails.PersonalDetailsFunction(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.NoTranstFourDays.Yodlee.UID, TestData.BankDetails.NoTranstFourDays.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(); // Choose reason for no transactions bool notrans = _bankDetails.NoTransaction(TestData.NoTransactionReasons.Usinganother); Assert.IsTrue(notrans, "No transaction page not appeared"); // 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 (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Application went to manual approval"); // 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 bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Application went to manual approval"); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // 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 TC166_Verifying_ANR1_RL(int loanamout, string strmobiledevice, string BankUsername, string BankPwd) { strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); //Go to the homepage and click the start application button and then the Request money button _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValueRL(loanamout); //Click on Select First POL Lst _loanPurposeDetails.ClickSelectFirstPurposeBtn(); // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeRL(TestData.POL.Homerepairsorimprovements); // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtnRL(); //Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFunction_RL(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, TestData.OverrideCodes.PassAll_RL); // 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"); // 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 (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(); } //// 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 TC002_EmploymentStatus_RL(int loanamout, string strmobiledevice) { strMessage += string.Format("\r\n\t " + TestContext.CurrentContext.Test.Name + " Starts"); strUserType = "RL"; try { _driver = TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); // Login with existing user _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); // Click on Request Money Button _homeDetails.ClickRequestMoneyBtn(); //Click on Start Application Button _homeDetails.ClickExistinguserStartApplictionBtn(); // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValueRL(loanamout); //Click on Select First POL Lst _loanPurposeDetails.ClickSelectFirstPurposeBtn(); // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeRL(TestData.POL.RentBondRelocation); // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtnRL(); // 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.ReturnerLoaner); // Check Read Credit Guide _personalDetails.CheckReadCreditBtn(TestData.ReturnerLoaner); if (GetPlatform(_driver)) { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsContinueBtnRLMobile(); } else { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsRequestBtnRLDesktop(); // Click on checks out Continue Button _personalDetails.ClickAutomaticVerificationBtn(); } // 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(); // Verify ApprovedAmount _loanSetUpDetails.VerifySetUpPageDetails(7, loanamout, loanamout, strUserType); if (GetPlatform(_driver)) { // click on Button Submit _loanSetUpDetails.ClickSubmitBtn(); // Click on Bank Account to transfer // _bankDetails.ClicksixtyMinuteButton(); // click on sublit-payment Button // _bankDetails.ClickSubmitPaymentButton(); } else { // Click on Bank Account to transfer _bankDetails.ClicksixtyMinuteButton(); // 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(); strMessage += string.Format("\r\n\t Ends"); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); strMessage += string.Format("\r\n\t Ends"); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC166_Verifying_ANR1_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"); //Go to the homepage and click the start application button _homeDetails.HomeDetailsPage(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Eventcosts.Anniversary); //populate the personal details and proceed _personalDetails.PersonalDetailsFunction(); // 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"); // 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 (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(); } //// 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 TC060_VerifySpik_Quaterly_OOC_LeaveLoading_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); //Go to the homepage and click the start application button and then the Request money button _homeDetails.homeFunctions_RL(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Households); //Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFunction_RL(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, TestData.OverrideCodes.PassAll_RL); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.Spike_OOC_Difftran.Yodlee.UID, TestData.BankDetails.Spike_OOC_Difftran.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, "1"); //Verify Just Checking Option is visisble Assert.IsTrue(_bankDetails.VerifySpikeQuestionText("We've identified that the following transaction is higher than normal.")); //Verify if its is OOC question triggered for the right amount Assert.AreEqual("$1,310.00", _bankDetails.GetSpikeTransactionAmountTxt()); //Verify if its is OOC question triggered for the right Date Assert.AreEqual("Salary ABC holdings", _bankDetails.GetSpikeTransactionDescriptionTxt()); //Select reason _bankDetails.SelectReasonforSpikequestion("Quarterly bonus"); //Verify Just Checking Option is visisble Assert.IsTrue(_bankDetails.VerifyOOCQuestionText("We've identified that the following transaction is out of cycle."), "OOC income question did not triggered"); //Verify if its is OOC question triggered for the right amount Assert.AreEqual("$1,100.00", _bankDetails.GetOOCTransactionAmountTxt()); //Verify if its is OOC question triggered for the right Date Assert.AreEqual("Salary ABC holdings", _bankDetails.GetOOCTransactionDescriptionTxt()); //Select reason _bankDetails.SelectReasonforOOCquestion("Leave loading"); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // 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(); #region commented old scenario //// Verify ApprovedAmount //Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); //if (GetPlatform(_driver)) //{ // // click on Button Submit // _bankDetails.ClickSubmitBtn(); // // Click on Bank Account to transfer // _bankDetails.ClicksixtyMinuteButton(); // // click on sublit-payment Button // _bankDetails.ClickSubmitPaymentButton(); //} //else //{ // // Click on Bank Account to transfer // _bankDetails.ClicksixtyMinuteButton(); // // click on Buton Submit // _bankDetails.ClickSubmitBtn(); //} #endregion _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC123_VerifyingHasSACCNo_RePayNo_UptoDateYes_NimblePay_Yes_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); // Login with existing user _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean); // Click on Request Money Button _homeDetails.ClickRequestMoneyBtn(); //Click on Start Application Button _homeDetails.ClickExistinguserStartApplictionBtn(); //Click on Select First POL Lst _loanPurposeDetails.ClickSelectFirstPurposeBtn(); // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeRL(TestData.POL.Eventcosts.Birthdayparty); // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValueRL(loanamout); // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtnRL(); // Fetching First Name string Firstname = _loanPurposeDetails.GetFirstName(); // select Employement Status _personalDetails.SelectEmploymentStatusLst(TestData.YourEmployementStatus.FullTime); // select short term loans value as YES _personalDetails.ClickNoShortTermLoanStatusBtn(); // Check Read Privacy and Electronic Authorisation _personalDetails.CheckReadPrivacyBtn(TestData.ReturnerLoaner); // Check Read Credit Guide _personalDetails.CheckReadCreditBtn(TestData.ReturnerLoaner); if (GetPlatform(_driver)) { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsContinueBtnRLMobile(); } else { // Click on Personal Details Continue Button _personalDetails.ClickPersonaldetailsRequestBtnRLDesktop(); // Click on checks out Continue Button _personalDetails.ClickAutomaticVerificationBtn(); } // 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 - "Yes" _bankDetails.SelectUseNimbletoRepayLoanBtn(true); // 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); } }