Esempio n. 1
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);
            }
        }