public void TC158_VerifyDNQUserReApplywithSuccess_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.RequestLoanAmount(loanamout, TestData.POL.Partlyfullyrepayacurrentshorttermloan); //_loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households); //populate the personal details and proceed PersonalDetailsDataObj _obj = _personalDetails.PersonalDetailsFunction1(); // Verify unsuccessful message string UnsuccessMsg = "Application unsuccessful"; Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg)); //verify DNQ Message string ActualDNQMessage = "You currently don't qualify for a Nimble loan"; Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage)); email = _personalDetails.EmailID; // quiting the driver _driver.Quit(); _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); _homeDetails.ClickLoginBtn(); _homeDetails.LoginLogoutUser(_obj.Email, "password"); //click on update profile _loanSetUpDetails.UpdateYourProfile(); //click on save Button _loanSetUpDetails.UpdateSaveBtn(); //click on Loan dashboard _loanSetUpDetails.ToLoanDashboard(); //click on request money _loanSetUpDetails.RequestMoney(); // Click on Start Your Application Button _homeDetails.ClickStartApplictionBtn(); // 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"); // Select Just checking option //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC074_Verifyretain_UnfinishedApplication_NL(int loanamout, string strmobiledevice) { strUserType = "NL"; try { _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); //Go to the homepage and click the start application button _homeDetails.HomeDetailsPage(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households); //populate the personal details and proceed PersonalDetailsDataObj _obj = _personalDetails.PersonalDetailsFunction(); emal = _personalDetails.EmailID; // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); //---------------------------------------------------------------------------- _driver.Quit(); _driver = _testengine.TestSetup(strmobiledevice); _homeDetails = new HomeDetails(_driver, "NL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL"); _personalDetails = new PersonalDetails(_driver, "NL"); _bankDetails = new BankDetails(_driver, "NL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "NL"); _homeDetails.ClickLoginBtn(); //TODO _homeDetails.ReLoginUser(_obj.Email, "password"); //Verify Verify Button enabled on dasboard screen Assert.IsTrue(_loanSetUpDetails.VerifyVerifyBtn(), "Verify button is not visible"); //TODO _loanSetUpDetails.ClickVerifyBtn(); //---------------------------------------------------------------------------- // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // Select Just checking option // _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } #region commented old scenario //// click on Buton Submit //_loanSetUpDetails.ClickSubmitBtn(); // // Scrolling the Loan Contract // _loanSetUpDetails.Loancontract(); // // Confirming accepting contract // _loanSetUpDetails.ConfirmAcceptingContract(); // // click on I Agree button // _loanSetUpDetails.ClickOnAgreeBtn(); // // click on No thanks Button // _loanSetUpDetails.ClickNothanksBtn(); // if (GetPlatform(_driver)) // { // // Click on To Loan Dashboard Button // _loanSetUpDetails.ClickMobileLoanDashboardBtn(); // // click on More Button from Bottom Menu // _loanSetUpDetails.ClickMoreBtn(); // //Logout // _loanSetUpDetails.Logout(); // } // else // { // // Click on Loan Dashboard Button // _loanSetUpDetails.ClickLoanDashboard(); // //Logout // _loanSetUpDetails.Logout(); // } //} //catch (Exception ex) //{ // strMessage += ex.Message; Assert.Fail(ex.Message); //} #endregion }
public void TC001_VerifyPOL_RL(int loanamout) { // Click on Login Button _homeDetails.ClickLoginBtn(); // Login with existing user _homeDetails.LoginExistingUser(TestData.RandomPassword); // Click on Request Money Button _homeDetails.ClickRequestMoneyBtn(); //Click on Start Application Button _homeDetails.ClickExistinguserStartApplictionBtn(); //Click on Select First POL Lst _homeDetails.ClickandSelectFirstPOL(); // Select Purpose of loan _loanpurposedetails.SelectLoanPurpose(TestData.POL.Eventcosts.Birthdayparty); // Select Loan Value from Slide bar _loanpurposedetails.SelectLoanValue(loanamout); // Enter FirstPOLLoan Amount _loanpurposedetails.EnterFirstPOLAmountTxt(loanamout.ToString()); // Click on Continue Button _loanpurposedetails.ClickLoanPOLContinueBtn(); // 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); // Click on Personal Details Continue Button _personaldetails.ClickPersonaldetailsContinueBtn(); // Click on checks out Continue Button _personaldetails.ClickAutomaticVerificationBtn(); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.DAGbank.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.DAGbank.UID, TestData.BankDetails.DAGbank.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(TestData.BankDetails.DAGbank.BSB, TestData.BankDetails.DAGbank.AccountNumber, TestData.BankDetails.DAGbank.AccountName); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); // Select Category _bankDetails.SelectIncomeCategoryLst(TestData.IncomeCategory.PrimaryIncome); // Select Just checking option _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickGovtBenefitsOptionLst(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); // enter sms input as OTP _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); // Verify Loan Setup Text displayed _LoanSetUpDetails.VerifyDisplayedText(); // Click on Bank Account to transfer _bankDetails.ClicksixtyMinuteButton(); // click on Buton Submit _LoanSetUpDetails.ClickSubmitBtn(); // Select Reason for Spend Less _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(); // Click on Loan Dashboard Button _LoanSetUpDetails.ClickLoanDashboard(); }
public void TC074_Verifyretain_UnfinishedApplication_RL(int loanamout, string strmobiledevice) { strUserType = "RL"; try { _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); string strEmailId = string.Empty; // Login with existing user _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.ReturnerDagBankstaging); email = _homeDetails.RLEmailID; // Click on Request Money Button _homeDetails.ClickRequestMoneyBtn(); //Click on Start Application Button _homeDetails.ClickExistinguserStartApplictionBtn(); //Select the loan amount and purpose and click on continue button _loanPurposeDetails.LoanPurposeFunction_RL(loanamout, TestData.POL.Households); string streetname = "At:N Cr:A Id:100 Rr1:A Rr2:A Rr3:A Rr:A Rt:8 Rmsrv:0.9999"; //Edit the personal details and change the Rmsrv Code strEmailId = _personalDetails.PersonalDetailsFunction_Skipbanklogin(TestData.YourEmployementStatus.FullTime, TestData.ReturnerLoaner, streetname); // select Bank Name _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank); // Click on Continue Button _bankDetails.BankSelectContinueBtn(); if (bsAutoRefresh) { // Entering Username and Password _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD); // Click on Continue Button _bankDetails.ClickAutoContinueBtn(); } // choose bank account _bankDetails.BankAccountSelectBtn(); // Click on bank select Continue Button _bankDetails.ClickBankAccountContBtn(); // Confirm Bank Details _bankDetails.EnterBankDetailsTxt(); // Click on Confirm account details Continue Button _bankDetails.ClickAcctDetailsBtn(); //---------------------------------------------------------------------------- //LogOut _driver.Quit(); _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); _homeDetails.ClickLoginBtn(); _homeDetails.LoginLogoutUser(strEmailId, "password"); //Verify Verify Button enabled on dasboard screen Assert.IsTrue(_loanSetUpDetails.VerifyVerifyBtn(), "Verify button is not visible"); // click on verify button _loanSetUpDetails.ClickVerifyBtn(); // Choose reason for no transactions //bool notrans = _bankDetails.NoTransaction(TestData.NoTransactionReasons.Usingcash); //Assert.IsTrue(notrans, "No transaction page not appeared"); // Select Category _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0"); // click on Confirm Income Button _bankDetails.ClickConfirmIncomeBtn(); // select other debt repayments option No _bankDetails.SelectOtherDebtRepaymentsOptionBtn(); // select dependents _bankDetails.SelectDependantsLst(TestData.Dependents.Zero); // Click on continue _bankDetails.ClickConfirmExpensesBtn(); // select Governments benefits option No _bankDetails.ClickNoGovtBenefitsbtn(); // click on Agree that information True _bankDetails.ClickAgreeAppSubmitBtn(); // click on confirm Submit button _bankDetails.ClickConfirmSummaryBtn(); if (loanamout > 2000) { // enter sms input as OTP if (_bankDetails.VerifySMSOTP()) { _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode); } } // verify final review enabled and process setup functionality _loanSetUpDetails.loanSetupFunction(loanamout, strUserType); } catch (Exception ex) { strMessage += ex.Message; Assert.Fail(ex.Message); } }
public void TC148_VerifySACCInsideGrace_DebitCard_CloseSite_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"); //Go to the homepage strEmail = _homeDetails.homeFunctions_RL(TestData.ClientType.NewProduct, TestData.Feature.MissedRepaymentinGrace); // Edit Profile to add success override (Cp:P) if (GetPlatform(_driver)) { // Mobile Site flow _homeDetails.ClickMobileMoreBtn(); _homeDetails.ClickMobileYourProfileLnk(); _homeDetails.ClickMobileYourProfileContactLnk(); _homeDetails.EnterMobileYourProfileStreetNameTxt("Cp:P"); _homeDetails.ClickMobileYourProfileSaveBtn(); _homeDetails.ClickMobileDashboardLnk(); } else { // Desktop flow _homeDetails.ClickMemberAreaEditProfileLnk(); _homeDetails.ClickEditProfileContactDetailsBtn(); _homeDetails.EnterEditProfileStreetNameTxt("Cp:P"); _homeDetails.ClickEditProfileSaveBtn(); _homeDetails.ClickEditProfileLoanDashboardBtn(); } // Click Make a Payment button _homeDetails.ClickMakeRepaymentBtn(); // Select Direct Card as the payment option and Continue _homeDetails.CheckRepaymentDebitCardChkbx(); _homeDetails.ClickRepaymentContinueBtn(); // Pay via Debit Card page // Reference page for testing valid card numbers: // http://www.braemoor.co.uk/software/creditcard.shtml _homeDetails.EnterRepaymentNameOnCardTxt("MR TEST APPLE"); _homeDetails.EnterRepaymentCardNumberTxt("4111 1111 1111 1111"); _homeDetails.EnterRepaymentExpiryTxt("12/17"); _homeDetails.EnterRepaymentSecurityTxt("300"); _homeDetails.ClickRepaymentDebitCardBtn(); Thread.Sleep(5000); //LogOut _driver.Quit(); _driver = _testengine.TestSetup(strmobiledevice, "RL"); _homeDetails = new HomeDetails(_driver, "RL"); _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL"); _personalDetails = new PersonalDetails(_driver, "RL"); _bankDetails = new BankDetails(_driver, "RL"); _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL"); _homeDetails.ClickLoginBtn(); _homeDetails.LoginLogoutUser(strEmail, "password"); //Check that payment is successful Assert.IsTrue(_bankDetails.GetCheckLoanPaidTxt().Contains("Loan Repaid")); } catch (Exception ex) { Assert.Fail(ex.Message); strMessage += ex.Message; } }