public void TC101_VerifySACCInsideGrace_DebitCard_RL(int loanamout, string strmobiledevice)
        {
            strUserType = "RL";
            try
            {
                _driver      = TestSetup(strmobiledevice, "RL");
                _homeDetails = new HomeDetails(_driver, "RL");

                // Login with existing user
                _homeDetails.LoginExistingUser_SACCOutGrace(TestData.RandomPassword, loanamout, 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/18");
                _homeDetails.EnterRepaymentSecurityTxt("300");
                _homeDetails.ClickRepaymentDebitCardBtn();

                // Confirm payment on popup window
                _homeDetails.ClickRepaymentDebitCardDoneBtn();

                // Payment submitted + email sent to client at this point
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
        public void TC168_VerifyDebitCardPaymentwith_NO_EziDebit_transactionfee_RL(int loanamout, string strmobiledevice)
        {
            strUserType = "RL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice, "RL");
                _homeDetails        = new HomeDetails(_driver, "RL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL");
                _personalDetails    = new PersonalDetails(_driver, "RL");
                _bankDetails        = new BankDetails(_driver, "RL");
                _loanSetupDetails   = new LoanSetUpDetails(_driver, "RL");

                //Go to the homepage and click the start application button and then the Request money button
                string strEmail = _homeDetails.homeFunctions_RL(TestData.ClientType.NewProduct, TestData.Feature.MissedRepaymentinGrace);

                // Click Make a Payment button
                _homeDetails.ClickMakeRepaymentBtn();

                // Select Direct Card as the payment option and Continue
                _homeDetails.CheckRepaymentDebitCardChkbx();
                _homeDetails.ClickRepaymentContinueBtn();

                // enter minimum repayment amount lessthan $10
                _homeDetails.EnterRepaymentAmount("$2");

                // Verify min rules & warning message to "Repayment amount"
                Assert.IsTrue(_homeDetails.GetCheckRepaymentErrorMessage().Contains("Can not accept payment less than $10."));

                // enter maximum repayment amount greaterthan $10100
                _homeDetails.EnterRepaymentAmount("$10100");

                // Verify max rules & warning message to "Repayment amount"
                Assert.IsTrue(_homeDetails.GetCheckRepaymentErrorMessage().Contains("You can only pay up to your current payout amount"));

                // enter correct repayment amount $500
                _homeDetails.EnterRepaymentAmount("$500");

                _homeDetails.EnterRepaymentNameOnCardTxt("MR TEST APPLE");
                _homeDetails.EnterRepaymentCardNumberTxt("4111 1111 1111 1111");
                _homeDetails.EnterRepaymentExpiryTxt("12/18");
                _homeDetails.EnterRepaymentSecurityTxt("300");
                _homeDetails.ClickRepaymentDebitCardBtn();

                //Payment failed
                Assert.IsTrue(_bankDetails.GetCheckPaymentMessage().Contains("Oops! Your card payment was unsuccessful."));

                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();

                _homeDetails.EnterRepaymentNameOnCardTxt("MR TEST APPLE");
                _homeDetails.EnterRepaymentCardNumberTxt("4111 1111 1111 1111");
                _homeDetails.EnterRepaymentExpiryTxt("12/18");
                _homeDetails.EnterRepaymentSecurityTxt("300");
                _homeDetails.ClickRepaymentDebitCardBtn();

                // Confirm payment on popup window
                _homeDetails.ClickRepaymentDebitCardDoneBtn();

                //Check that payment is successful
                Assert.IsTrue(_bankDetails.GetCheckLoanPaidTxt().Contains("Loan Repaid"));

                //logout
                _loanSetupDetails.Logout();
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 3
0
        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);
            }
        }
Exemplo n.º 4
0
        public void TC178_Verify_Email_Changed_in_MemberArea_RL(int loanamout, string strmobiledevice)
        {
            strUserType = "RL";
            try
            {
                _driver           = TestSetup(strmobiledevice, "RL");
                _homeDetails      = new HomeDetails(_driver, "RL");
                _personalDetails  = new PersonalDetails(_driver, "RL");
                _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL");

                // Login with existing user
                _homeDetails.LoginExistingUser(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.NewProductAdvancePaidClean);

                // Edit Profile to add success override (Cp:P)
                if (GetPlatform(_driver))
                {
                    // Mobile Site flow
                    //Click on More button
                    _loanSetUpDetails.ClickMoreBtn();

                    //Click on your profile link
                    _homeDetails.ClickMemberAreaEditProfileLnk();

                    //Click on personal details link
                    _personalDetails.ClickPersonalDetails();

                    //Fetch existing email
                    string email = _personalDetails.FetchRLEmail();

                    //Fetch updated email
                    string updatedEmail = _personalDetails.splitEmail(email);

                    //Re enter updated email in email text box
                    _personalDetails.reEnterEmail(updatedEmail);

                    //Click on save button
                    _personalDetails.clickSaveButton();

                    //Click on More button
                    _loanSetUpDetails.ClickMoreBtn();

                    //Click on logout
                    _loanSetUpDetails.Logout();

                    //Relogin with updated email
                    _homeDetails.ReLoginUser(updatedEmail, TestData.Password);

                    //verify useer home page
                    Assert.IsTrue(_homeDetails.VerifyUserHomePage(), "Requext Money Button");

                    //Click on More button
                    _loanSetUpDetails.ClickMoreBtn();

                    //Click on logout
                    _loanSetUpDetails.Logout();
                }
                else
                {
                    //Desktop flow
                    //Click on Edit profile link
                    _homeDetails.ClickMemberAreaEditProfileLnk();

                    //Click on personal details link
                    _personalDetails.ClickPersonalDetails();

                    //Fetch existing email
                    string email = _personalDetails.FetchRLEmail();

                    //Fetch updated email
                    string updatedEmail = _personalDetails.splitEmail(email);

                    //Re enter updated email in email text box
                    _personalDetails.reEnterEmail(updatedEmail);

                    //Click on save button
                    _personalDetails.clickSaveButton();

                    //Click on logout
                    _loanSetUpDetails.Logout();

                    //Relogin with updated email
                    _homeDetails.ReLoginUser(updatedEmail, TestData.Password);

                    //verify useer home page
                    Assert.IsTrue(_homeDetails.VerifyUserHomePage(), "User Home Displayed with altered Email");

                    //Click on logout
                    _loanSetUpDetails.Logout();
                }
            }
            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;
            }
        }