Esempio n. 1
0
        public void TC208_Verify_Prefail_Reschedule_DivideOver_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");

                //login user
                _homeDetails.LoginExistingUser(TestData.Password, loanamout, TestData.ClientType.NewProduct, TestData.Feature.ReturnerSACCActive);

                if (PrefailReschedule)
                {
                    //click on Reschedule button
                    _bankDetails.ClickRescheduleButton();

                    //click on Divide CheckBox
                    _bankDetails.ClickDivideCheckBox();

                    //get upcoming repayment from first page
                    string UpcomingFirstPage = _bankDetails.getPrefailUpcomingRepaymentFirstPage("3");

                    //Click continue button after reschedule
                    _bankDetails.ClickRescheduleContinueButton();

                    //Fetch Reschedule message
                    string RescheduleMessage = _bankDetails.VerifyRescheduleMessage();

                    Assert.IsTrue(RescheduleMessage.Contains("Thanks!"), "Message not displayed");

                    //Get upcoming repayment from last page
                    string UpcomingLastPage = _bankDetails.GetPrefailUpcomingRepaymentLastPage("5");

                    //Assert.AreEqual(missedRepayment, missedRepayment1, "Missed repayments are not matching");
                    Assert.AreEqual(UpcomingFirstPage, UpcomingLastPage, "Missed repayments are not matching");

                    //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 TC104_VerifySACCGraceOutside_ReSchedulePayment(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");

                //login user
                _homeDetails.LoginGracePeriodUser(TestData.Password, TestData.ClientType.NewProduct, TestData.Feature.MissedRepaymentinContract);

                //Fetching the missed repayment message
                string MiissedRepaymentmessage = _bankDetails.VerifyMissedRepaymentMessage();

                Assert.IsTrue(MiissedRepaymentmessage.Contains("Oops"), "Message not displayed");

                //Fetching missed repayment value from first page
                string missedRepayment = _bankDetails.GetMissedRepaymentFirstPage();

                //click on Reschedule button
                _bankDetails.ClickRescheduleButton();

                //click on Divide CheckBox
                _bankDetails.ClickDivideCheckBox();

                //get upcoming repayment from first page
                string UpcomingFirstPage = _bankDetails.getUpcomingRepaymentFirstPage();

                //Click continue button after reschedule
                _bankDetails.ClickRescheduleContinueButton();

                //Fetch Reschedule message
                string RescheduleMessage = _bankDetails.VerifyRescheduleMessage();

                Assert.IsTrue(RescheduleMessage.Contains("Thanks!"), "Message not displayed");

                //Get missed repayment from last page
                string missedRepayment1 = _bankDetails.GetMissedRepaymentLastPage();

                //Get upcoming repayment from last page
                string UpcomingLastPage = _bankDetails.PrefailUpcomingRepaymentFinalPage();

                Assert.AreEqual(missedRepayment, missedRepayment1, "Missed repayments are not matching");

                Assert.AreEqual(UpcomingFirstPage, UpcomingLastPage, "Missed repayments are not matching");

                //Logout
                _loanSetUpDetails.Logout();
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }