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

            try
            {
                // Login with existing user
                _homeDetails.LoginExistingUser_SACCOutGrace(TestData.RandomPassword, loanamout, TestData.ClientType.NewProduct, TestData.Feature.MissedRepaymentinContract);

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

                // Select EFT as the payment option and Continue
                _homeDetails.CheckRepaymentEFTChkbx();

                _homeDetails.ClickRepaymentContinueBtn();

                // Confirm you want to repay by Direct Debit
                _homeDetails.ClickRepaymentEFTBtn();

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

                //Verify Confirmed Message
                Assert.IsTrue(_loanSetUpDetails.GetConfirmedTxtSetUp().Contains("We'll be in touch to confirm your payment has been made."), "Incorrect message");
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Пример #2
0
        public void TC103_VerifySACCInsideGrace_EFT_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);

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

                // Select EFT as the payment option and Continue
                _homeDetails.CheckRepaymentEFTChkbx();

                _homeDetails.ClickRepaymentContinueBtn();

                // Confirm you want to repay by Direct Debit
                _homeDetails.ClickRepaymentEFTBtn();

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

                // Payment submitted + email sent to client at this point
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
        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 TC102_VerifySACCInsideGrace_BPAY_RL(int loanamout, string strmobiledevice)
        {
            strUserType = "RL";
            try
            {
                _driver           = TestSetup(strmobiledevice, "RL");
                _homeDetails      = new HomeDetails(_driver, "RL");
                _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL");

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

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

                if (onlineBpaymentsIsEnabled == "true")
                {
                    // Select BPAY as the payment option and Continue
                    _homeDetails.CheckRepaymentBPAYChkbx();
                    _homeDetails.ClickRepaymentContinueBtn();

                    // Confirm you want to repay by Direct Debit
                    _homeDetails.ClickRepaymentBPAYBtn();

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

                    // Payment submitted + email sent to client at this point
                    Assert.IsTrue(_loanSetUpDetails.GetConfirmedTxtSetUp().Contains("We'll be in touch to confirm your payment has been made."), "Incorrect message");

                    //Click on logout
                    _loanSetUpDetails.Logout();
                }
                else
                {
                    //Click on logout
                    _loanSetUpDetails.Logout();
                }
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Пример #5
0
        public void TC149_VerifySACCDebitcard_Incorrect_Details_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 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();

                // Pay via Debit Card page using incorrect expiry date
                // 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("04/18");
                _homeDetails.EnterRepaymentSecurityTxt("300");
                _homeDetails.ClickRepaymentDebitCardBtn();

                //Payment failed
                Assert.IsTrue(_bankDetails.GetCheckPaymentMessage().Contains("Oops! Your card payment was unsuccessful."));
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
                strMessage += 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);
            }
        }
        public void TC205_VerifyPaymentViaDirectDebit_Payout_RL(int loanamout, string strmobiledevice)
        {
            strUserType = "RL";
            try
            {
                _driver           = TestSetup(strmobiledevice, "RL");
                _homeDetails      = new HomeDetails(_driver, "RL");
                _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL");
                _bankDetails      = new BankDetails(_driver, "RL");

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

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

                    // Select Direct Debit as the payment option and Continue
                    _homeDetails.CheckRepaymentDirectDebitChkbx();

                    //Click confirm button
                    _homeDetails.ClickRepaymentContinueBtn();

                    // Confirm you want to payout
                    _homeDetails.clickPayoutButton();

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

                    if (GetPlatform(_driver))
                    {
                        //Click on finish button
                        _bankDetails.clickFinishBtn();

                        // click on More Button from Bottom Menu
                        _loanSetUpDetails.ClickMoreBtn();

                        //Logout
                        _loanSetUpDetails.Logout();
                    }
                    else
                    {
                        //Click on logout
                        _loanSetUpDetails.Logout();
                    }
                }

                else
                {
                    // prefail functionality disabled
                    //Verify request money button
                    Assert.IsTrue(_homeDetails.verifyRequestMoneyBtn(), "Request Button");

                    //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;
            }
        }