public void TC098_VerifySACCOutsideGrace_BPay_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();

                //Check for Bpay payment option
                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();

                    //Verify Confirmed Message
                    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);
            }
        }
Esempio n. 2
0
        public void TC207_VerifyPaymentViaBpay_RL(int loanamout, string strmobiledevice)
        {
            strUserType       = "RL";
            _driver           = TestSetup(strmobiledevice, "RL");
            _homeDetails      = new HomeDetails(_driver, "RL");
            _loanSetUpDetails = new LoanSetUpDetails(_driver, "RL");
            _bankDetails      = new BankDetails(_driver, "RL");

            try
            {
                // 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 BPAY as the payment option and Continue
                    _homeDetails.CheckRepaymentBPAYChkbx();

                    _homeDetails.ClickRepaymentContinueBtn();

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

                    if (GetPlatform(_driver))
                    {
                        //Click confirm Bpay
                        _homeDetails.ClickBpayConfirmBtn();

                        //Click on finish button
                        _bankDetails.clickFinishBtn();

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

                        //Logout
                        _loanSetUpDetails.Logout();
                    }
                    else
                    {
                        // 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");

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