public void TC075_VerifyHighIncome_LowEx_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = 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); //populate the personal details and proceed _personalDetails.PersonalDetailsFunction(); //Fill Up all the required bank details and submits the application _bankDetails.bankFunctions(TestData.BankDetails.Dagbank, TestData.BankDetails.HighIncome.Yodlee.UID, TestData.BankDetails.HighIncome.Yodlee.PWD, TestData.IncomeCategory.PrimaryIncome, TestData.Dependents.Zero, TestData.SMSCode, loanamout); if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Application unable to move to manual approval"); } else { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Application unable to move to manual approval"); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void VerifyOOCQuestionIncome_RL(int loanamout, string oocresponse, 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); email = _homeDetails.RLEmailID; //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.OOCQuestion.Yodlee.UID, TestData.BankDetails.OOCQuestion.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"); //verify the spike question text "We've identified that the following transaction is higher than normal" should be read. Assert.IsTrue(_bankDetails.VerifyOOCQuestionText(TestData.OOCText), "Expected OOC Text : " + TestData.OOCText + ". Observed OOC Text : " + TestData.OOCText); //Verify if its is OOC question triggered for the right Description Assert.AreEqual("Salary Jims Mowing", _bankDetails.GetOOCTransactionDescriptionTxt()); //Verify if its is OOC question triggered for the right amount Assert.AreEqual("$910.00", _bankDetails.GetOOCTransactionAmountTxt()); // Select Just checking option _bankDetails.SelectReasonforOOCquestion(oocresponse); // Enter Other reason for spike income if (oocresponse == "Other (we may contact you)") { _bankDetails.EnterOtherReasonForOOC(TestData.OtherReason); } // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // 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")) || (oocresponse == "Other (we may contact you)")) { // if (oocresponse == "Other (we may contact you)") if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _loanSetUpDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _loanSetUpDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } #region code commented //if (GetPlatform(_driver)) //{ // //ClickOn Loan Dashboard...Manual Approval // _bankDetails.ClickLoanDashboardManual(); // //click on Final Approve // _loanSetUpDetails.FinalApprove(); // //Click Setup Button // _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(); //} #endregion // 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 TC067_VerifyReqAmt_GreaterThn_Approved_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.ReturnerDagBankstaging); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Utilitybills.Onebill); //MoreInformation _loanPurposeDetails.MoreInformation(); //Edit the personal details and change the Rmsrv Code _personalDetails.PersonalDetailsFunction_Skipbanklogin(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, TestData.OverrideCodes.PassAll_NL); // 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"); // 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(); //Note: As the scenario does not get lower than requested, hence verifying if the application to manual - Kenan if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Approved amount not less than the requested amount"); } else { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Approved amount not less than the requested amount"); } #region old code // 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(); // } //} ////Get the approved loan amount value //int approvedAmount = _loanSetUpDetails.GetApprovedamount(); //// Verify ApprovedAmount //Assert.Greater(loanamout, _loanSetUpDetails.GetApprovedamount(), "Approved amount not less than requested amount"); ////Reduce the approved loan value //_loanSetUpDetails.MoveLoanValueSlider(); //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(); //// Verify Funded Amount ////Assert.IsTrue(_loanSetUpDetails.VerifyApprovedGreaterThanFunded(approvedAmount, _loanSetUpDetails.VerifyFundedAmount()), "Expected approved Amount : " + approvedAmount + ". Observed Funded Amount : " + _loanSetUpDetails.VerifyFundedAmount()); //Assert.Greater(approvedAmount, _loanSetUpDetails.VerifyFundedAmount(), "Aprroved amount not 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 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.SingleDI.Yodlee.UID, TestData.BankDetails.SingleDI.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomeCategDeposit1(TestData.IncomeCategory.PrimaryIncome); // Select Just checking option SelectIncome1Reason(income1); // Select Category _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.OtherEmployment); //Verify if Reason is requested to specify Assert.IsFalse(_bankDetails.VerifySelectJustCheckingDeposit2IsDisplayed()); // Select Category _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.PrimaryIncome); //Verify if Reason is requested to specify Assert.IsTrue(_bankDetails.VerifySelectJustCheckingDeposit2IsDisplayed()); // Select Category _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.OtherEmployment); // 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 (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || verification) { //Click on Launch dashboard _loanSetUpDetails.ClickLoanDashboardManual(); //Click on Final approval _bankDetails.ClickFinalApproval(); //Click on setup _bankDetails.ClickSetup(); } // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); // Select Reason for Spend Less bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless(); if (ReasonPageExists == true) { _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC122_VerifyingHasSACCNo_RePayNo_UptoDateYes_NimblePay_No_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } // entering personal details with overwrite values PersonalDetailsDataObj _obj = new PersonalDetailsDataObj(); _obj.Have2SACCLoan = "No"; //_personalDetails.PopulatePersonalDetails(); _personalDetails.PopulatePersonalDetails(_obj); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.UID, TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Verify Other short-term loans and select POL's _bankDetails.SelectPOLExistingSACC(TestData.POL.Households, TestData.POL.EducationFees); // Select Have you fully repaid previos loan - "No" _bankDetails.SelectFullyRepaidLoanbtn(false); //Select are you uptodate with repayment- "Yes" _bankDetails.SelectAreyouUpdatewithLoanBtn(true); //Select To use any of this Nimble loan to make these repayments - "NO" _bankDetails.SelectUseNimbletoRepayLoanBtn(false); // click on Confirm SACC continue button _bankDetails.ClickConfirmSACCNamesBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No //_bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // if (loanamout > 2000 && FinalReviewEnabled == "true") if ((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Select Reason for Spend Less bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless(); if (ReasonPageExists == true) { _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC033_ApplyLoanwithNimbleCardYES_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; _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"); try { //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(); //Fill Up all the required bank details and submits the application _bankDetails.bankFunctions(TestData.BankDetails.Dagbank, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD, TestData.IncomeCategory.PrimaryIncome, TestData.Dependents.Zero, TestData.SMSCode, loanamout); if (loanamout > 2600 && FinalReviewEnabled == "true") { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on wants a visacard Rbtn _loanSetUpDetails.ClickAndSaveVisaCardRbtn(); //click on Nimble card submit button _loanSetUpDetails.ClickOnNimbleCardSubmit(); 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); } #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 wants a visacard Rbtn // _loanSetUpDetails.ClickAndSaveVisaCardRbtn(); // //click on Nimble card submit button // _loanSetUpDetails.ClickOnNimbleCardSubmit(); // 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 TC157_VerifyTwoSecondaryIncome_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); //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.TwoPrimaryIncome.UID, TestData.BankDetails.TwoPrimaryIncome.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 first Income Category as PrimaryIncome _bankDetails.SelectIncomecategory(TestData.IncomeCategory.OtherEmployment, "1"); // Select Just checking option for first income category _bankDetails.SelectJustCheckingforNoPrimaryIncome("Yes, I will be getting this income", "2"); // Select second Income Category as PrimaryIncome _bankDetails.SelectIncomecategory(TestData.IncomeCategory.OtherEmployment, "0"); // Select Just checking option for first income category _bankDetails.SelectJustCheckingforNoPrimaryIncome("Yes, I will be getting this income", "0"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); //click on pop up continue // _bankDetails.NoPrimaryIncomeContinueBtn(); // 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(); // enter sms input as OTP if (loanamout > 2600) { if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } 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 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 VerifyInconsistencyIncome_NL(int loanamout, string income1, string income2, string mobiledevice) { 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_NL; _personalDetails.PopulatePersonalDetails(_dataObj); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); email = _personalDetails.EmailID; // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.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 (loanamout > 2000 && FinalReviewEnabled == "true") { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // 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); } #region commented old scenario //// 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); //} #endregion }
public void TC032_ApplyLoanwithRepaymentDateHighest_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; _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"); try { //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(); //Fill Up all the required bank details and submits the application _bankDetails.bankFunctions(TestData.BankDetails.Dagbank, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD, TestData.IncomeCategory.PrimaryIncome, TestData.Dependents.Zero, TestData.SMSCode, loanamout); 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(); } } 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); } #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 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 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 TC137_VerifyCBANoCardOffered_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.SelectOtherDebtRepaymentsOptionBtn(); _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.ClickConfirmExpensesBtn(); // Your Summary page _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); } } // if (loanamout > 2000 && FinalReviewEnabled == "true") if ((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Loan Contract page _loanSetUpDetails.Loancontract(); _loanSetUpDetails.ConfirmAcceptingContract(); _loanSetUpDetails.ClickOnAgreeBtn(); //TODO - Andy // Make sure Nimble Card offer page Submit button is not shown Assert.IsFalse(_loanSetUpDetails.VerifyNimbleCardSubmitBtnVisible()); 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 TC117_VerifyRepayment_Amount_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); string lastRepaysetuppage = ""; //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(); //Fill Up all the required bank details and submits the application _bankDetails.bankFunctions(TestData.BankDetails.Dagbank, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD, TestData.IncomeCategory.PrimaryIncome, TestData.Dependents.Zero, TestData.SMSCode, loanamout); // if (loanamout > 2000 && FinalReviewEnabled == "true") if ((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); //click on DetailedRepaymentSchedule _loanSetUpDetails.ClickDetailedRepaymentSchedule(); //get last repayment amount in setup page lastRepaysetuppage = _loanSetUpDetails.GetLastRepaymentAmount(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); //click on DetailedRepaymentSchedule _loanSetUpDetails.ClickDetailedRepaymentSchedule(); //get last repayment amount in setup page lastRepaysetuppage = _loanSetUpDetails.GetLastRepaymentAmount(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); //click on DetailedRepaymentSchedule _loanSetUpDetails.ClickDetailedRepaymentSchedule(); //get last repayment amount in setup page lastRepaysetuppage = _loanSetUpDetails.GetLastRepaymentAmount(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); string lastrepayconfirmpage = _loanSetUpDetails.FinalRepaymentConfirmPage(); Assert.AreEqual(lastRepaysetuppage, lastrepayconfirmpage, "Mismatch in Last Repayments"); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); // Verify Funded Amount Assert.IsTrue(_loanSetUpDetails.VerifyFundedAmount(loanamout), " Expected Requested Amount : " + loanamout + ". Observed Funded Amount : " + _loanSetUpDetails.VerifyFundedAmount()); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC093_ChangeRepaymentFrequency_Monthly_NL(int loanamout, string strmobiledevice, int mnthamt) { 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 _personalDetails.PersonalDetailsFunction(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // 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 (loanamout > 2000) { // enter sms input as OTP _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } // if (loanamout > 2000 && FinalReviewEnabled == "true") if ((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // verify monthly repayment option not visible/displayed Assert.IsTrue(_loanSetUpDetails.verifyMonthlyrepaymentInvisible(), "monthly repayment option not visible"); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // verify monthly repayment option not visible/displayed Assert.IsTrue(_loanSetUpDetails.verifyMonthlyrepaymentInvisible(), "monthly repayment option not visible"); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // verify monthly repayment option not visible/displayed Assert.IsTrue(_loanSetUpDetails.verifyMonthlyrepaymentInvisible(), "monthly repayment option not visible"); // 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); } #region commented old scenario //// Verify ApprovedAmount //Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // //Get Repayment amount on weekly repay // // int RepaymentMonthly = mnthamt; // //Click FortNight // // _loanSetUpDetails.ClickMonthly(); // // verify monthly repayment option not visible/displayed // Assert.IsTrue(_loanSetUpDetails.verifyMonthlyrepaymentInvisible(), "monthly repayment option not visible"); // //Get Repayment amount on fortnight repay // // int RepaymentAmountMonthly = _loanSetUpDetails.getRepAmtInTable(mnthamt); // // Assert.AreEqual(RepaymentMonthly, RepaymentAmountMonthly, "Values not matched"); // _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); //} //catch (Exception ex) //{ // strMessage += ex.Message; Assert.Fail(ex.Message); //} #endregion }
public void TC200_Verifying_Calculator_Duration_RL(int loanamout, string strmobiledevice) { strMessage += string.Format("\r\n\t " + TestContext.CurrentContext.Test.Name + " Starts"); strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _loanCalculatorDetails = new LoanCalculatorDetails(_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(); // Validating ONline calculator Visibility if (calculatorIsEnabled == "true") { Assert.IsTrue(_loanCalculatorDetails.OnlineCalculatorVisibility(), "Expected Visibility of Online Calculator"); } //Selecting the loan amount in online calculator _loanCalculatorDetails.RequestLoanAmountDurationCalculationRL(loanamout); //Click on Start Application Button _homeDetails.ClickExistinguserStartApplictionBtn(); //Click on Select First POL Lst _loanPurposeDetails.ClickSelectFirstPurposeBtn(); // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeRL(TestData.POL.Households); // 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); Thread.Sleep(2000); // wait to click continue button // 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 set up apge 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(); } } 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 TC116_VerifyTextDisplay_ROPage_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = 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"); int approvedAmount = 0; //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(); //Fill Up all the required bank details and submits the application _bankDetails.bankFunctions(TestData.BankDetails.Dagbank, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD, TestData.IncomeCategory.PrimaryIncome, TestData.Dependents.Zero, TestData.SMSCode, loanamout); if (loanamout > 2000 && FinalReviewEnabled == "true") { 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(); approvedAmount = _loanSetUpDetails.GetApprovedamount(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); //Reduce the approved loan value _loanSetUpDetails.MoveLoanValueSlider(); // 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(); approvedAmount = _loanSetUpDetails.GetApprovedamount(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); //Reduce the approved loan value _loanSetUpDetails.MoveLoanValueSlider(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { approvedAmount = _loanSetUpDetails.GetApprovedamount(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); //Reduce the approved loan value _loanSetUpDetails.MoveLoanValueSlider(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Select Reason for Spend Less bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless(); Assert.IsTrue(_loanSetUpDetails.FindandselectSpendless(), "R&O Page does not exist"); 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(); Assert.Greater(approvedAmount, _loanSetUpDetails.VerifyFundedAmount(), "Aprroved amount is not 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(); } } 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 VerifySpikeQuestionIncome_NL(int loanamout, string spikeresponse, 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); //populate the personal details and proceed _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.SpikeQuestion.Yodlee.UID, TestData.BankDetails.SpikeQuestion.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"); //verify the spike question text "We've identified that the following transaction is higher than normal" should be read. Assert.IsTrue(_bankDetails.VerifySpikeQuestionText(TestData.SpikeText), "Expected Spike Text : " + TestData.SpikeText + ". Observed Spike Text : " + TestData.SpikeText); //Verify if its is Spike question triggered for the right Description Assert.AreEqual("Salary Jims Mowing", _bankDetails.GetSpikeTransactionDescriptionTxt()); //Verify if its is Spike question triggered for the right amount Assert.AreEqual("$4,000.00", _bankDetails.GetSpikeTransactionAmountTxt()); // Select Just checking option _bankDetails.SelectReasonforSpikequestion(spikeresponse); // Entere Other reason for spike income if (spikeresponse == "Other (we may contact you)") { _bankDetails.EnterOtherReasonForSpike(TestData.OtherReason); } // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } if (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || (spikeresponse == "Other (we may contact you)")) { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void 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 VerifyInconsistencyIncome_NL(int loanamout, string income1, string income2, string mobiledevice, bool verification) { strUserType = "NL"; _driver = _testengine.TestSetup(mobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); try { // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Households); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Households); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } PersonalDetailsDataObj _dataObj = new PersonalDetailsDataObj { StreetName = TestData.OverrideCodes.PassAll_NL }; _personalDetails.PopulatePersonalDetails(_dataObj); // Click on checks out Continue Button _personalDetails.ClickCheckoutContinueBtn(); email = _personalDetails.EmailID; // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.SingleDI.Yodlee.UID, TestData.BankDetails.SingleDI.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomeCategDeposit1(TestData.IncomeCategory.PrimaryIncome); // Select Just checking option SelectIncome1Reason(income1); // Select Category _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.PrimaryIncome); //Verify if Reason is requested to specify Assert.IsTrue(_bankDetails.VerifySelectJustCheckingDeposit2IsDisplayed()); // Select Category _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.OtherEmployment); //Verify if Reason is requested to specify Assert.IsFalse(_bankDetails.VerifySelectJustCheckingDeposit2IsDisplayed()); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); System.Threading.Thread.Sleep(2000); // enter sms input as OTP if (loanamout > 2000) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } if (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || verification) { //Click on Launch dashboard _loanSetUpDetails.ClickLoanDashboardManual(); //Click on Final approval _bankDetails.ClickFinalApproval(); //Click on setup _bankDetails.ClickSetup(); } // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); // Select Reason for Spend Less bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless(); if (ReasonPageExists == true) { _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC_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 TC122_VerifyingHasSACCNo_RePayNo_UptoDateYes_NimblePay_No_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(); // 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.TwoOrmoreSACCLoans.Yodlee.UID, TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Verify Other short-term loans and select POL's _bankDetails.SelectPOLExistingSACC(TestData.POL.Households, TestData.POL.EducationFees); // Select Have you fully repaid previos loan - "No" _bankDetails.SelectFullyRepaidLoanbtn(false); //Select are you uptodate with repayment- "Yes" _bankDetails.SelectAreyouUpdatewithLoanBtn(true); //Select To use any of this Nimble loan to make these repayments - "NO" _bankDetails.SelectUseNimbletoRepayLoanBtn(false); // click on Confirm SACC continue button _bankDetails.ClickConfirmSACCNamesBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No // _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if ((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Select Reason for Spend Less bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless(); if (ReasonPageExists == true) { _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC196_Verify_Auto_DNQed_Client_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"); _personalDetails = new PersonalDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); // Login with existing user _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NimbleStatus, TestData.Feature.AutoDNQ); if (GetPlatform(_driver)) { //Mobile //Verify message string expectedMessage = "You currently don't qualify for a Nimble loan."; string actualMessage = _homeDetails.getManualDNQMessage(); Assert.AreEqual(expectedMessage, actualMessage); //Click on More button _loanSetUpDetails.ClickMoreBtn(); //Click on your profile link _homeDetails.ClickMemberAreaEditProfileLnk(); //Click on contact details link _personalDetails.ClickContactDetails(); //Fetch street name string streetNumber = _personalDetails.FetchStreetNumber(); string updateStreetNumber = streetNumber + "1"; //Re enter street name _personalDetails.enterStreetName(updateStreetNumber); //Click on save button _personalDetails.clickContactSaveButtonMob(); //Click on To loan dashboard button _loanSetUpDetails.clickDashboardMob(); } else { //Desktop string expectedMessage = "Sorry, you currently don't qualify for a Nimble loan."; string actualMessage = _homeDetails.getManualDNQMessage(); Assert.AreEqual(expectedMessage, actualMessage); //Click on Edit profile link _homeDetails.ClickMemberAreaEditProfileLnk(); //Click on contact details link _personalDetails.ClickContactDetails(); //Fetch street name string streetNumber = _personalDetails.FetchStreetNumber(); string updateStreetNumber = streetNumber + "1"; //Re enter street name _personalDetails.enterStreetName(updateStreetNumber); //Click on save button _personalDetails.clickSaveButton(); //Click on To loan dashboard button _loanSetUpDetails.ToLoanDashboard(); } // 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.Households); // 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(); } // 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"); // 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(); Thread.Sleep(3000); // 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 { if (!_loanSetUpDetails.verifyVerifyButton()) { //click on Refresh button Approve _loanSetUpDetails.clickRefreshButton(); //Click on verify button _loanSetUpDetails.clickVerifyButton(); } else { //Click on verify button _loanSetUpDetails.clickVerifyButton(); } // 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(); } } //else //{ // if (!_loanSetUpDetails.verifySetupButton()) // { // Thread.Sleep(2000); // //click on Refresh button Approve // _loanSetUpDetails.clickRefreshButton(); // //Click Setup Button // _loanSetUpDetails.ClickSetup(); // } // else // { // //Click Setup Button // _loanSetUpDetails.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(); 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 TC075_VerifyHighIncome_LowEx_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.HighIncome.Yodlee.UID, TestData.BankDetails.HighIncome.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"); // 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(); //Note:Due to high income and low expenses,the application goes to manual approval. if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Application unable to move to manual approval"); } else { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Application unable to move to manual approval"); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC058_VerifySpikeAndOOCIncom_Other_NL(int loanamout, string strmobiledevice, string strOOCReason) { 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); // 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_OOC_SameTrans.Yodlee.UID, TestData.BankDetails.Spike_OOC_SameTrans.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.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("$2,000.00", _bankDetails.GetOOCTransactionAmountTxt()); //Verify if its is OOC question triggered for the right amount // Assert.AreEqual(_bankDetails.GetTransactionDateFromStatementTxt(6), _bankDetails.GetOOCTransactionDateTxt()); //Verify if its is OOC question triggered for the right Date Assert.AreEqual("Salary ABC holdings", _bankDetails.GetOOCTransactionDescriptionTxt()); //Select reason _bankDetails.SelectReasonforOOCquestion(strOOCReason); //Enter Other Reason _bankDetails.EnterOtherReasonForOOC(TestData.OtherReason); // 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); } } if (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || (strOOCReason == "Other (we may contact you)")) // if (loanamout > 2000 && FinalReviewEnabled == "true" || strOOCReason == "Other (we may contact you)") { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } #region commented old scenario ////hard code wait as the screen flips during transciton //Thread.Sleep(5000); ////ClickOn Loan Dashboard...Manual Approval //_bankDetails.ClickLoanDashboardManual(); ////click on Final Approve //_loanSetUpDetails.FinalApprove(); ////Click Setup Button //_bankDetails.ClickSetup(); #endregion } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC140_YourExpenses_NoRent_LivingWithFamily_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 - set rent to $0, select Living With Family/Friends as a response _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); _bankDetails.EnterExpenseMortgageTxt("0"); _bankDetails.SelectExpenseNoRentLst("Living with a family/friend"); _bankDetails.ClickConfirmExpensesBtn(); // Your Summary page _bankDetails.ClickNoGovtBenefitsbtn(); _bankDetails.ClickAgreeAppSubmitBtn(); _bankDetails.ClickConfirmSummaryBtn(); 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(); } } // Set Up Loan page if (GetPlatform(_driver)) { _loanSetUpDetails.ClickSubmitBtn(); _bankDetails.ClicksixtyMinuteButton(); _bankDetails.ClickSubmitPaymentButton(); } else { _bankDetails.ClicksixtyMinuteButton(); _loanSetUpDetails.ClickSubmitBtn(); } // Loan Contract page _loanSetUpDetails.Loancontract(); _loanSetUpDetails.ConfirmAcceptingContract(); _loanSetUpDetails.ClickOnAgreeBtn(); 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 TC093_ChangeRepaymentFrequency_Monthly_RL(int loanamout, string strmobiledevice, int mnthamt) { 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); 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.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 Income _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 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); } } // verify monthly repayment option not visible/displayed Assert.IsTrue(_loanSetUpDetails.verifyMonthlyrepaymentInvisible(), "monthly repayment option not visible"); // click on Button Submit _bankDetails.ClickSubmitBtn(); _loanSetUpDetails.loanSetupFunction_RL(loanamout); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC067_VerifyReqAmt_GreaterThn_Approved_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = 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.Utilitybills.Onebill); //MoreInformation _loanPurposeDetails.MoreInformation(); //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.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"); // 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); } } //Note: As the scenario does not get lower than requested, hence verifying if the application to manual - Kenan if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Approved amount not less than the requested amount"); } else { //ClickOn Loan Dashboard...Manual Approval bool flag = _loanSetUpDetails.ClickLoanDashboardManual(); Assert.IsTrue(flag, "Approved amount not less than the requested amount"); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC107_VerifyingTwo_BankAcc_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); string justcheckingoption = "Yes, it will stay the same (or more)"; // Click on Apply Button _homeDetails.ClickApplyBtn(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); bool hideshow = _homeDetails.CheckHideShow(); if (hideshow == true) { if (GetPlatform(_driver)) { _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary); } else { _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary); } } else { // Select Loan Value from Slide bar _loanPurposeDetails.SelectLoanValue(loanamout); //Click on First POL to select _loanPurposeDetails.ClickSelectFirstPurposeBtn(); if (GetPlatform(_driver)) { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary); } else { // Select Purpose of loan _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary); } // Enter FirstPOLLoan Amount _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanPurposeDetails.ClickLoanPOLContinueBtn(); } //_personalDetails.PopulatePersonalDetails(); _personalDetails.PersonalDetailsFunction(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password // _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); // Click on Continue Button //_bankDetails.ClickAutoContinueBtn(); //Click on Add Another BAnk Button //_bankDetails.ClickAddAnotherBankBtn(); // select Bank Name //_bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TwoBankAccounts.Yodlee.UID, TestData.BankDetails.TwoBankAccounts.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose first bank account _bankDetails.BankAccountselectforfirstBS(); // choose second bank account //_bankDetails.BankAccountselectforsecondBS(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "1"); // Select Just checking option for first income category _bankDetails.SelectJustCheckingOption(justcheckingoption, "1"); // Click view transactions link _bankDetails.ClickViewTransactionsBtn(); // validate merged 2 bank statements description Assert.IsTrue(_bankDetails.ValidateTransactionDesc()); // validate merged 2 bank statements amount int totaltransactionsamt = _bankDetails.ValidateTransactionAmount(); // Select second Income Category as PrimaryIncome _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option for first income category _bankDetails.SelectJustCheckingOption(justcheckingoption, "0"); // Enter Other reason for two bank income if (justcheckingoption == "Other (we may contact you)") { _bankDetails.EnterOtherReasonForSpike(TestData.OtherReason); } // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); //Assert the expenses int expensesamount = _bankDetails.ExpensesAmount(); int actualexpensesamount = 777; //726 int actualexpensesamount2 = 718; //depending on time of year, sometimes Everyday Living Expenses value is 718, so need to check for either Assert.IsTrue(expensesamount == actualexpensesamount || expensesamount == actualexpensesamount2); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } if (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || (justcheckingoption == "Other (we may contact you)")) //if (loanamout > 2000 || FinalReviewEnabled == "true" || justcheckingoption == "Other (we may contact you)") { if (GetPlatform(_driver)) { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); // click on Approve button _loanSetUpDetails.ClickApproveBtn(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } else { //ClickOn Loan Dashboard...Manual Approval _loanSetUpDetails.ClickLoanDashboardManual(); //click on Final Approve _loanSetUpDetails.FinalApprove(); //Click Setup Button _bankDetails.ClickSetup(); // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } } else { // Verify ApprovedAmount Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount()); // click on Buton Submit _loanSetUpDetails.ClickSubmitBtn(); } // Scrolling the Loan Contract _loanSetUpDetails.Loancontract(); // Confirming accepting contract _loanSetUpDetails.ConfirmAcceptingContract(); // click on I Agree button _loanSetUpDetails.ClickOnAgreeBtn(); // click on No thanks Button _loanSetUpDetails.ClickNothanksBtn(); if (GetPlatform(_driver)) { // Click on To Loan Dashboard Button _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // click on More Button from Bottom Menu _loanSetUpDetails.ClickMoreBtn(); //Logout _loanSetUpDetails.Logout(); } else { // Click on Loan Dashboard Button _loanSetUpDetails.ClickLoanDashboard(); //Logout _loanSetUpDetails.Logout(); } } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }