Exemplo n.º 1
0
        public void TC081_VerifyingFraudSuspiciousInvalidBSBandPostcode_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households);

                // entering personal details with random values
                PersonalDetailsDataObj PersonalDetils = _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // 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.EnterInvalidBankDetailsTxt();

                // Click on Confirm account details Continue Button
                _bankDetails.ClickAcctDetailsBtn();

                //verify DNQ Screen
                Assert.IsTrue(_personalDetails.GetDNQTxt().Contains("Sorry " + PersonalDetils.FirstName));

                //verify DNQ Message
                string ActualDNQMessage = "We're sorry, you didn't qualify for a Nimble loan today.";
                Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage));
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 2
0
        public void TC173_Verify_Proviso_AccountTypes_Rejected_NL(int loanamout, string strmobiledevice, string BankUsername, string BankPwd)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households);

                PersonalDetailsDataObj _obj = new PersonalDetailsDataObj();

                _obj.StreetName = "At:N Cr:A Id:100 Rr1:A Rr2:A Rr3:A Bsp:BS Rmsrv:1";

                //populate the personal details and proceed
                _personalDetails.PopulatePersonalDetails(_obj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(BankUsername, BankPwd);

                // Click on Continue Button
                _bankDetails.ClickAutoContinueBtn();

                // Bank Details - check account type is invalid message
                Assert.IsTrue(_bankDetails.CheckBankLoginFailedErrMsgTxt().Contains("It seems the system is experiencing some technical hiccups."));
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message); strMessage += ex.Message;
            }
        }
Exemplo n.º 3
0
        public void TC077_VerifyAML_Medicare_NL_AML1Reject_AML2Accept(int loanamount, string strdevice)
        {
            strUserType = "NL";
            _driver     = TestSetup(strdevice, "NL");
            HomeDetails        _homeDetails        = new HomeDetails(_driver, "NL");
            LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");

            _personalDetails = new PersonalDetails(driver, "NL");
            PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj();
            BankDetails            _bankDetails         = new BankDetails(driver, "NL");
            LoanSetUpDetails       _loanSetUpDetails    = new LoanSetUpDetails(driver, "NL");

            try
            {
                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamount, TestData.POL.Households);

                // Personal Details page
                _personalDetailsData.StreetName = "Cr:A Id:0 A2:S Rr:A Rr2:A Rr3:A He:A Bsp:Y Rmsrv:0.9999";
                // _personalDetailsData.StreetName = "At:N Cr:A Id:0 Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:1";
                _personalDetails.PopulatePersonalDetails(_personalDetailsData);
                _personalDetails.ClickCheckoutContinueBtn();

                // Bank Details page
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);
                _bankDetails.BankSelectContinueBtn();
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD);
                _bankDetails.ClickAutoContinueBtn();
                _bankDetails.BankAccountSelectBtn();
                _bankDetails.ClickBankAccountContBtn();
                _bankDetails.EnterBankDetailsTxt();
                _bankDetails.ClickAcctDetailsBtn();

                // Your Income page
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");
                _bankDetails.ClickConfirmIncomeBtn();
                _bankDetails.SelectOtherDebtRepaymentsOptionBtn();

                // Your Expenses page
                _bankDetails.SelectDependantsLst(TestData.Dependents.Zero);
                _bankDetails.ClickConfirmExpensesBtn();
                _bankDetails.ClickNoGovtBenefitsbtn();

                // Your Summary page
                _bankDetails.ClickAgreeAppSubmitBtn();
                _bankDetails.ClickConfirmSummaryBtn();

                // Id pages
                _bankDetails.CheckIdAuthorisationChkbx();
                _bankDetails.SelectIdTypeLst("Medicare");
                _bankDetails.EnterIdMedicareCardNumberTxt();
                _bankDetails.EnterIdMedicareRefNoTxt("1");
                _bankDetails.SelectIdMedicareCardColourLst("Green");
                _bankDetails.EnterIdMedicareCardNameTxt("Brian123");
                _bankDetails.SelectIdMedicareExpiryDateMonthLst("Jul");
                _bankDetails.SelectIdMedicareExpiryDateYearLst("2020");
                _bankDetails.ClickIdSubmitBtn();

                // SMS Verification page
                if (loanamount > 2000)
                {
                    // Enter sms input
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamount, strUserType);
            }

            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
        public void TC159_VerifyUserwithexistingOneSAACLoan_NL(int loanamout, string strmobiledevice, bool repaid, bool uptodate, bool nimblepay)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                // Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Click on Start Your Application Button
                _homeDetails.ClickStartApplictionBtn();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Households);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //Click on First POL to select
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households);
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households);
                    }

                    // Enter FirstPOLLoan Amount
                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }
                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.OneSAAC.Yodlee.UID, TestData.BankDetails.OneSAAC.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();

                // Verify Other short-term loans and select POL's
                _bankDetails.SelectPOLExistingSACC(TestData.POL.Households);

                // Select Have you fully repaid previos loan - "repaid"
                _bankDetails.SelectFullyRepaidLoanbtn(repaid);

                //Select are you uptodate with repayment- "uptodate"
                _bankDetails.SelectAreyouUpdatewithLoanBtn(uptodate);

                if (uptodate)
                {
                    //Select To use any of this Nimble loan to make these repayments - "nimblepay"
                    _bankDetails.SelectUseNimbletoRepayLoanBtn(nimblepay);
                }

                // click on Confirm SACC continue button
                _bankDetails.ClickConfirmSACCNamesBtn();

                if (nimblepay || !uptodate)
                {
                    // Verify unsuccessful message
                    string UnsuccessMsg = "Application unsuccessful";
                    Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg));

                    //verify DNQ Message
                    string ActualDNQMessage = "You currently don't qualify for a Nimble loan";
                    Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage));
                }
                else
                {
                    // Select Category
                    _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                    // Select Just checking option
                    _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                    if (loanamout > 2000)
                    {
                        // enter sms input as OTP
                        if (_bankDetails.VerifySMSOTP())
                        {
                            _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                        }
                    }

                    // verify final review enabled and process setup functionality
                    _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
                }
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 5
0
        public void TC014_VerifyYestoTwoSACC_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Eventcosts.Anniversary);

                // entering personal details with overwrite values
                PersonalDetailsDataObj _obj = new PersonalDetailsDataObj();

                _obj.Have2SACCLoan = "Yes";

                //_personalDetails.PopulatePersonalDetails();
                _personalDetails.PopulatePersonalDetails(_obj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.UID, TestData.BankDetails.TwoOrmoreSACCLoans.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();

                // Verify Other short-term loans and select POL's
                _bankDetails.SelectPOLExistingSACC(TestData.POL.Households, TestData.POL.EducationFees);

                // Select Have you fully repaid previos loan - "Yes"
                _bankDetails.SelectFullyRepaidLoanbtn(true);

                // click on Confirm SACC continue button
                _bankDetails.ClickConfirmSACCNamesBtn();

                // Select Category
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                // Select Just checking option
                _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2600)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }

            #region commented old scenario

            //// 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();
            //    }
            //    else
            //    {
            //        // Click on Loan Dashboard Button
            //        _loanSetUpDetails.ClickLoanDashboard();

            //        //Logout
            //        _loanSetUpDetails.Logout();
            //    }

            //}
            //catch(Exception ex)
            //{
            //    strMessage += ex.Message; Assert.Fail(ex.Message);
            //}
            #endregion
        }
        public void TC_169_Verify_Monthly_BankStatement(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households);

                PersonalDetailsDataObj _obj = new PersonalDetailsDataObj();

                _obj.StreetName = "At:N Cr:A Id:100 Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:1";

                //populate the personal details and proceed
                _personalDetails.PopulatePersonalDetails(_obj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.Monthly.Yodlee.UID, TestData.BankDetails.Monthly.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");

                // Select Just checking option
                //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message); strMessage += ex.Message;
            }
        }
Exemplo n.º 7
0
        public void TC005_RequestedApprovedFundedAmount_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                // Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Click on Start Your Application Button
                _homeDetails.ClickStartApplictionBtn();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Birthdayparty);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Birthdayparty);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //Click on First POL to select
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Birthdayparty);
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Birthdayparty);
                    }

                    // Enter FirstPOLLoan Amount
                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

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

                // Select Just checking option
                //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // Verify ApprovedAmount
                _loanSetUpDetails.VerifySetUpPageDetails(7, loanamout, loanamout, strUserType);

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

                // Verify Funded Amount
                Assert.IsTrue(_loanSetUpDetails.VerifyFundedAmount(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Funded Amount : " + _loanSetUpDetails.VerifyFundedAmount());

                if (GetPlatform(_driver))
                {
                    // Click on To Loan Dashboard Button
                    _loanSetUpDetails.ClickMobileLoanDashboardBtn();

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

                    //Logout
                    _loanSetUpDetails.Logout();
                }
                else
                {
                    // Click on Loan Dashboard Button
                    _loanSetUpDetails.ClickLoanDashboard();

                    //Logout
                    _loanSetUpDetails.Logout();
                }
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 8
0
        public void TC124_VerifyingHasSACCNo_RePayNo_UptoDate_No_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                // Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Click on Start Your Application Button
                _homeDetails.ClickStartApplictionBtn();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //Click on First POL to select
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary);
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary);
                    }

                    // Enter FirstPOLLoan Amount
                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // entering personal details with overwrite values
                PersonalDetailsDataObj _obj = new PersonalDetailsDataObj();

                _obj.Have2SACCLoan = "No";

                //_personalDetails.PopulatePersonalDetails();
                _personalDetails.PopulatePersonalDetails(_obj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.UID, TestData.BankDetails.TwoOrmoreSACCLoans.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();

                // Verify Other short-term loans and select POL's
                _bankDetails.SelectPOLExistingSACC(TestData.POL.Households, TestData.POL.EducationFees);

                // Select Have you fully repaid previos loan - "No"
                _bankDetails.SelectFullyRepaidLoanbtn(false);

                //Select are you uptodate with repayment- "No"
                _bankDetails.SelectAreyouUpdatewithLoanBtn(false);

                // click on Confirm SACC continue button
                _bankDetails.ClickConfirmSACCNamesBtn();

                // Verify unsuccessful message
                string UnsuccessMsg = "Application unsuccessful";
                Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg));

                //verify DNQ Message
                string ActualDNQMessage = "You currently don't qualify for a Nimble loan";
                Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage));
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 9
0
        public void TC063_VerifyOOC_Quaterly_II_NooldJob_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice, "NL");
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households);

                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.OOC_II_FNT.Yodlee.UID, TestData.BankDetails.OOC_II_FNT.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, "1");

                //Verify Just Checking Option is visisble
                Assert.IsTrue(_bankDetails.VerifyOOCQuestionText("We've identified that the following transaction is out of cycle."), "OOC income question did not triggered");

                //Verify if its is OOC question triggered for the right amount
                Assert.AreEqual("$1,000.00", _bankDetails.GetOOCTransactionAmountTxt());

                //Verify if its is OOC question triggered for the right Date
                Assert.AreEqual("Salary ABC holdings", _bankDetails.GetOOCTransactionDescriptionTxt());

                //Select reason
                _bankDetails.SelectReasonforOOCquestion("Quarterly bonus");

                //Verify II income
                _bankDetails.SelectJustCheckingDeposit1(TestData.ConfirmIncomeConsistency.No);

                // Select Category
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                // click on Confirm Income Button
                _bankDetails.ClickConfirmIncomeBtn();

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                //Wait for the Loan setup Page
                //_loanSetUpDetails.WaitForLoanSetUpPage();

                bool val = _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
                Assert.IsTrue(val, "Requested, Apporved and Funded Amount are not the Same");
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 10
0
        public void VerifyInconsistencyIncome_NL(int loanamout, string income1, string income2, string mobiledevice)
        {
            strUserType = "NL";

            _driver             = _testengine.TestSetup(mobiledevice);
            _homeDetails        = new HomeDetails(_driver, "NL");
            _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
            _personalDetails    = new PersonalDetails(_driver, "NL");
            _bankDetails        = new BankDetails(_driver, "NL");
            _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

            try
            {
                // Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Click on Start Your Application Button
                _homeDetails.ClickStartApplictionBtn();

                bool hideshow = _homeDetails.CheckHideShow();

                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Households);
                    }
                }
                else
                {
                    _loanPurposeDetails.SelectPOLAndAmount(loanamout, TestData.POL.Households);
                }

                PersonalDetailsDataObj _dataObj = new PersonalDetailsDataObj();
                _dataObj.StreetName = TestData.OverrideCodes.PassAll_NL;

                _personalDetails.PopulatePersonalDetails(_dataObj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                email = _personalDetails.EmailID;

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.IncosIncome_TC017.Yodlee.UID, TestData.BankDetails.IncosIncome_TC017.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.SelectIncomeCategDeposit1(TestData.IncomeCategory.PrimaryIncome);

                // Select Just checking option
                SelectIncome1Reason(income1);

                // Select Category
                _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.PrimaryIncome);

                // Select Just checking option
                SelectIncome2Reason(income2);

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

                System.Threading.Thread.Sleep(2000);

                // enter sms input as OTP
                if (loanamout > 2000)
                {
                    _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                }

                if (loanamout > 2000 && FinalReviewEnabled == "true")
                {
                    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
                        _bankDetails.ClickSetup();

                        // Verify ApprovedAmount
                        Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount());

                        // click on Buton Submit
                        _loanSetUpDetails.ClickSubmitBtn();
                    }
                    else
                    {
                        //ClickOn Loan Dashboard...Manual Approval
                        _loanSetUpDetails.ClickLoanDashboardManual();

                        //click on Final Approve
                        _loanSetUpDetails.FinalApprove();

                        //Click Setup Button
                        _bankDetails.ClickSetup();

                        // Verify ApprovedAmount
                        Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount());

                        // click on Buton Submit
                        _loanSetUpDetails.ClickSubmitBtn();
                    }
                }
                else
                {
                    // Verify ApprovedAmount
                    Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount());

                    // click on Buton Submit
                    _loanSetUpDetails.ClickSubmitBtn();
                }

                // Select Reason for Spend Less
                bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless();

                if (ReasonPageExists == true)
                {
                    _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct);
                }

                //  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();
                }
                else
                {
                    // Click on Loan Dashboard Button
                    _loanSetUpDetails.ClickLoanDashboard();

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

            #region commented old scenario

            //// click on Buton Submit
            //_loanSetUpDetails.ClickSubmitBtn();

            //    // Select Reason for Spend Less
            //    bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless();

            //    if (ReasonPageExists == true)
            //    {
            //        _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct);
            //    }

            //    //  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();
            //    }
            //    else
            //    {
            //        // Click on Loan Dashboard Button
            //        _loanSetUpDetails.ClickLoanDashboard();

            //        //Logout
            //        _loanSetUpDetails.Logout();
            //    }
            //}
            //catch (Exception ex)
            //{
            //    strMessage += ex.Message; Assert.Fail(ex.Message);
            //}
            #endregion
        }
Exemplo n.º 11
0
        public void TC058_VerifySpikeAndOOCIncom_Other_NL(int loanamout, string strmobiledevice, string strOOCReason)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households);

                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.Spike_OOC_SameTrans.Yodlee.UID, TestData.BankDetails.Spike_OOC_SameTrans.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, "1");

                //Verify Just Checking Option is visisble
                Assert.IsTrue(_bankDetails.VerifyOOCQuestionText("We've identified that the following transaction is out of cycle."), "OOC income question did not triggered");

                //Verify if its is OOC question triggered for the right amount
                Assert.AreEqual("$2,000.00", _bankDetails.GetOOCTransactionAmountTxt());

                //Verify if its is OOC question triggered for the right amount
                //  Assert.AreEqual(_bankDetails.GetTransactionDateFromStatementTxt(6), _bankDetails.GetOOCTransactionDateTxt());

                //Verify if its is OOC question triggered for the right Date
                Assert.AreEqual("Salary ABC holdings", _bankDetails.GetOOCTransactionDescriptionTxt());

                //Select reason
                _bankDetails.SelectReasonforOOCquestion(strOOCReason);

                //Enter Other Reason
                _bankDetails.EnterOtherReasonForOOC(TestData.OtherReason);

                // Select Category
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                // click on Confirm Income Button
                _bankDetails.ClickConfirmIncomeBtn();

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                if (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || (strOOCReason == "Other (we may contact you)"))
                // if (loanamout > 2000 && FinalReviewEnabled == "true" || strOOCReason == "Other (we may contact you)")
                {
                    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
                        _bankDetails.ClickSetup();

                        // Verify ApprovedAmount
                        Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount());

                        // click on Buton Submit
                        _loanSetUpDetails.ClickSubmitBtn();
                    }
                    else
                    {
                        //ClickOn Loan Dashboard...Manual Approval
                        _loanSetUpDetails.ClickLoanDashboardManual();

                        //click on Final Approve
                        _loanSetUpDetails.FinalApprove();

                        //Click Setup Button
                        _bankDetails.ClickSetup();

                        // Verify ApprovedAmount
                        Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount());

                        // click on Buton Submit
                        _loanSetUpDetails.ClickSubmitBtn();
                    }
                }
                else
                {
                    // Verify ApprovedAmount
                    Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount());

                    // 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();
                }
                else
                {
                    // Click on Loan Dashboard Button
                    _loanSetUpDetails.ClickLoanDashboard();

                    //Logout
                    _loanSetUpDetails.Logout();
                }

                #region commented old scenario
                ////hard code wait as the screen flips during transciton
                //Thread.Sleep(5000);

                ////ClickOn Loan Dashboard...Manual Approval
                //_bankDetails.ClickLoanDashboardManual();

                ////click on Final Approve
                //_loanSetUpDetails.FinalApprove();

                ////Click Setup Button
                //_bankDetails.ClickSetup();
                #endregion
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 12
0
        public void TC083_VerifyALM_InternationalPassport_NL_AM1Accept_AML2Reject(int loanamount, string strdevice)
        {
            _driver = TestSetup(strdevice);

            HomeDetails        _homeDetails        = new HomeDetails(_driver, "NL");
            LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");

            _personalDetails = new PersonalDetails(driver, "NL");
            PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj();
            BankDetails            _bankDetails         = new BankDetails(driver, "NL");
            LoanSetUpDetails       _loanSetUpDetails    = new LoanSetUpDetails(driver, "NL");

            try
            {
                // Home page
                _homeDetails.ClickApplyBtn();
                _homeDetails.ClickStartApplictionBtn();

                // Purpose of Loan page
                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamount, TestData.POL.Households);
                    }
                }
                else
                {
                    _loanPurposeDetails.SelectLoanValue(loanamount);
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households);
                    }

                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamount.ToString());
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // Personal Details page
                _personalDetailsData.StreetName = "Cr:A Id:0 A2:S Bs1:P Rr:A Rr2:A Rr3:A He:A Bsp:Y Rmsrv:0.9844";
                _personalDetails.PopulatePersonalDetails(_personalDetailsData);
                _personalDetails.ClickCheckoutContinueBtn();

                // Bank Details page
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);
                _bankDetails.BankSelectContinueBtn();
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD);
                _bankDetails.ClickAutoContinueBtn();
                _bankDetails.BankAccountSelectBtn();
                _bankDetails.ClickBankAccountContBtn();
                _bankDetails.EnterBankDetailsTxt();
                _bankDetails.ClickAcctDetailsBtn();

                // Your Income page
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");
                _bankDetails.ClickConfirmIncomeBtn();
                _bankDetails.SelectOtherDebtRepaymentsOptionBtn();

                // Your Expenses page
                _bankDetails.SelectDependantsLst(TestData.Dependents.Zero);
                _bankDetails.ClickConfirmExpensesBtn();
                _bankDetails.ClickNoGovtBenefitsbtn();

                // Your Summary page
                _bankDetails.ClickAgreeAppSubmitBtn();
                _bankDetails.ClickConfirmSummaryBtn();

                // Id pages
                _bankDetails.CheckIdAuthorisationChkbx();
                _bankDetails.SelectIdTypeLst("International Passport");
                _bankDetails.EnterIdInternationalPassportNumberTxt();
                _bankDetails.SelectIdInternationalPassportCountryLst("UNITED KINGDOM");
                _bankDetails.ClickIdSubmitBtn();

                // SMS Verification page
                if (loanamount > 2000)
                {
                    // Enter sms input
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // Application Finished page
                _bankDetails.ClickLoanDashboardManual();

                // Member Area page
                _bankDetails.ClickFinalApproval();
                _bankDetails.ClickSetup();

                // Setup Loan page
                _loanSetUpDetails.ClickSubmitBtn();

                // Contract page
                _loanSetUpDetails.Loancontract();
                _loanSetUpDetails.ConfirmAcceptingContract();
                _loanSetUpDetails.ClickOnAgreeBtn();

                // Nimble Visa Prepaid Card page
                _loanSetUpDetails.ClickNothanksBtn();

                // Contract Signed page
                _loanSetUpDetails.ClickLoanDashboard();

                // Member Area page
                _loanSetUpDetails.Logout();
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 13
0
        public void TC077_VerifyAML_Medicare_NL_AML1Reject_AML2Reject(int loanamount, string strdevice)
        {
            strUserType = "NL";

            _driver = TestSetup(strdevice);

            HomeDetails        _homeDetails        = new HomeDetails(_driver, "NL");
            LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");

            _personalDetails = new PersonalDetails(driver, "NL");
            PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj();
            BankDetails            _bankDetails         = new BankDetails(driver, "NL");
            LoanSetUpDetails       _loanSetUpDetails    = new LoanSetUpDetails(driver, "NL");

            try
            {
                // Home page
                _homeDetails.ClickApplyBtn();
                _homeDetails.ClickStartApplictionBtn();

                // Purpose of Loan page
                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamount, TestData.POL.Households);
                    }
                }
                else
                {
                    _loanPurposeDetails.SelectLoanValue(loanamount);

                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households);
                    }

                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamount.ToString());
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // Personal Details page
                _personalDetailsData.StreetName = "At:N Cr:A Id:0 A2:F Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:0.9999";
                //_personalDetailsData.StreetName = "At:N Cr:A Id:0 Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:1";
                _personalDetails.PopulatePersonalDetails(_personalDetailsData);
                _personalDetails.ClickCheckoutContinueBtn();

                // Bank Details page
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);
                _bankDetails.BankSelectContinueBtn();
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD);
                _bankDetails.ClickAutoContinueBtn();
                _bankDetails.BankAccountSelectBtn();
                _bankDetails.ClickBankAccountContBtn();
                _bankDetails.EnterBankDetailsTxt();
                _bankDetails.ClickAcctDetailsBtn();

                // Your Income page
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");
                _bankDetails.ClickConfirmIncomeBtn();
                _bankDetails.SelectOtherDebtRepaymentsOptionBtn();

                // Your Expenses page
                _bankDetails.SelectDependantsLst(TestData.Dependents.Zero);
                _bankDetails.ClickConfirmExpensesBtn();
                _bankDetails.ClickNoGovtBenefitsbtn();

                // Your Summary page
                _bankDetails.ClickAgreeAppSubmitBtn();
                _bankDetails.ClickConfirmSummaryBtn();

                // Id pages
                _bankDetails.CheckIdAuthorisationChkbx();
                _bankDetails.SelectIdTypeLst("Medicare");
                _bankDetails.EnterIdMedicareCardNumberTxt();
                _bankDetails.EnterIdMedicareRefNoTxt("1");
                _bankDetails.SelectIdMedicareCardColourLst("Green");
                _bankDetails.EnterIdMedicareCardNameTxt("Brian123");
                _bankDetails.SelectIdMedicareExpiryDateMonthLst("Jul");
                _bankDetails.SelectIdMedicareExpiryDateYearLst("2020");
                _bankDetails.ClickIdSubmitBtn();

                // SMS Verification page
                //if (loanamount > 2000)
                //{
                //    // Enter sms input
                //    if (_bankDetails.VerifySMSOTP())
                //        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                //}

                //Check for oops message
                string expectedErrorMessage = "Oops. Our system had trouble confirming your identity.";
                string actualErrorMessage   = _bankDetails.getALMErrorMessage();
                Assert.AreEqual(expectedErrorMessage, actualErrorMessage);

                // Member Area page
                _loanSetUpDetails.Logout();
            }

            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
            //finally
            //{
            //    _driver.Quit();
            //    _result.SendTestResultToDb(TestContext.CurrentContext, strMessage, _homeDetails.RLEmailID, starttime);
            //}
        }
Exemplo n.º 14
0
        public void TC083_VerifyALM_InternationalPassport_NL_AM1Reject_AML2Reject(int loanamount, string strdevice)
        {
            _driver = TestSetup(strdevice, "NL");

            HomeDetails        _homeDetails        = new HomeDetails(_driver, "NL");
            LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");

            _personalDetails = new PersonalDetails(driver, "NL");
            PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj();
            BankDetails            _bankDetails         = new BankDetails(driver, "NL");
            LoanSetUpDetails       _loanSetUpDetails    = new LoanSetUpDetails(driver, "NL");

            try
            {
                // Home page
                _homeDetails.ClickApplyBtn();
                _homeDetails.ClickStartApplictionBtn();

                // Purpose of Loan page
                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamount, TestData.POL.Households);
                    }
                }
                else
                {
                    _loanPurposeDetails.SelectLoanValue(loanamount);
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households);
                    }

                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamount.ToString());
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // Personal Details page
                _personalDetailsData.StreetName = "At:N Cr:A Id:0 A2:F Bs1:P Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:0.9999";
                _personalDetails.PopulatePersonalDetails(_personalDetailsData);
                _personalDetails.ClickCheckoutContinueBtn();

                // Bank Details page
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);
                _bankDetails.BankSelectContinueBtn();
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD);
                _bankDetails.ClickAutoContinueBtn();
                _bankDetails.BankAccountSelectBtn();
                _bankDetails.ClickBankAccountContBtn();
                _bankDetails.EnterBankDetailsTxt();
                _bankDetails.ClickAcctDetailsBtn();

                // Your Income page
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");
                _bankDetails.ClickConfirmIncomeBtn();
                _bankDetails.SelectOtherDebtRepaymentsOptionBtn();

                // Your Expenses page
                _bankDetails.SelectDependantsLst(TestData.Dependents.Zero);
                _bankDetails.ClickConfirmExpensesBtn();
                _bankDetails.ClickNoGovtBenefitsbtn();

                // Your Summary page
                _bankDetails.ClickAgreeAppSubmitBtn();
                _bankDetails.ClickConfirmSummaryBtn();

                // Id pages
                _bankDetails.CheckIdAuthorisationChkbx();
                _bankDetails.SelectIdTypeLst("International Passport");
                _bankDetails.EnterIdInternationalPassportNumberTxt();
                _bankDetails.SelectIdInternationalPassportCountryLst("UNITED KINGDOM");
                _bankDetails.ClickIdSubmitBtn();

                // Member Area page
                // System could not ID person, person added to outbound contact queue to confirm details
                _loanSetUpDetails.Logout();
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
        public void TC202_VerifyingCSVImportTransDesc280_NL(int loanamout, string strmobiledevice)
        {
            try
            {
                strUserType = "NL";
                _driver     = _testengine.TestSetup(strmobiledevice);
                if (_driver != null)
                {
                    _homeDetails        = new HomeDetails(_driver, "NL");
                    _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                    _personalDetails    = new PersonalDetails(_driver, "NL");
                    _bankDetails        = new BankDetails(_driver, "NL");
                    _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                    // Click on Apply Button
                    _homeDetails.ClickApplyBtn();

                    // Click on Start Your Application Button
                    _homeDetails.ClickStartApplictionBtn();

                    bool hideshow = _homeDetails.CheckHideShow();
                    if (hideshow == true)
                    {
                        if (GetPlatform(_driver))
                        {
                            _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary);
                        }
                        else
                        {
                            _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary);
                        }
                    }
                    else
                    {
                        // Select Loan Value from Slide bar
                        _loanPurposeDetails.SelectLoanValue(loanamout);

                        //Click on First POL to select
                        _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                        if (GetPlatform(_driver))
                        {
                            // Select Purpose of loan
                            _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary);
                        }
                        else
                        {
                            // Select Purpose of loan
                            _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary);
                        }

                        // Enter FirstPOLLoan Amount
                        _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                        // Click on Continue Button
                        _loanPurposeDetails.ClickLoanPOLContinueBtn();
                    }

                    // entering personal details with overwrite values
                    PersonalDetailsDataObj _obj = new PersonalDetailsDataObj();

                    _obj.Have2SACCLoan = "No";

                    //_personalDetails.PopulatePersonalDetails();
                    _personalDetails.PopulatePersonalDetails(_obj);

                    // Click on checks out Continue Button
                    _personalDetails.ClickCheckoutContinueBtn();

                    // select Bank Name
                    _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                    // Click on Continue Button
                    _bankDetails.BankSelectContinueBtn();

                    // Entering Username and Password
                    _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TransDesc280.Yodlee.UID, TestData.BankDetails.TransDesc280.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();

                    strMessage += string.Format("\r\n\t Dag bank Launched");
                    // Select Category
                    _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                    // Select Just checking option
                    //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                    if (loanamout > 2000)
                    {
                        // enter sms input as OTP
                        if (_bankDetails.VerifySMSOTP())
                        {
                            _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                        }
                    }

                    // verify final review enabled and process setup functionality
                    _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
                }
            }
            catch (Exception ex)
            {
                strMessage += ex.Message;
                if (_driver != null)
                {
                    Assert.Fail(ex.Message);
                }
            }
        }
Exemplo n.º 16
0
        public void TC078_VerifyAML_DriversLicense_NL_AML1Reject_AML2Accept(int loanamount, string strdevice)
        {
            _driver = TestSetup(strdevice);

            HomeDetails        _homeDetails        = new HomeDetails(_driver, "NL");
            LoanPurposeDetails _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");

            _personalDetails = new PersonalDetails(driver, "NL");
            PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj();
            BankDetails            _bankDetails         = new BankDetails(driver, "NL");
            LoanSetUpDetails       _loanSetUpDetails    = new LoanSetUpDetails(driver, "NL");

            starttime = DateTime.Now;

            try
            {
                // Home page
                _homeDetails.ClickApplyBtn();
                _homeDetails.ClickStartApplictionBtn();

                // Purpose of Loan page
                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamount, TestData.POL.Households);
                    }
                }
                else
                {
                    _loanPurposeDetails.SelectLoanValue(loanamount);
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households);
                    }

                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamount.ToString());
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // Personal Details page
                _personalDetailsData.StreetName = "Cr:A Id:0 A2:S Rr:A Rr2:A Rr3:A He:A Rmsrv:0.9844 Bsp:Y";
                //_personalDetailsData.StreetName = "At:N Cr:A Id:0 Rr1:A Rr2:A Rr3:A Bsp:Y Rmsrv:1";
                _personalDetails.PopulatePersonalDetails(_personalDetailsData);
                _personalDetails.ClickCheckoutContinueBtn();

                // Bank Details page
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);
                _bankDetails.BankSelectContinueBtn();
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD);
                _bankDetails.ClickAutoContinueBtn();
                _bankDetails.BankAccountSelectBtn();
                _bankDetails.ClickBankAccountContBtn();
                _bankDetails.EnterBankDetailsTxt();
                _bankDetails.ClickAcctDetailsBtn();

                // Your Income page
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");
                _bankDetails.ClickConfirmIncomeBtn();
                _bankDetails.SelectOtherDebtRepaymentsOptionBtn();

                // Your Expenses page
                _bankDetails.SelectDependantsLst(TestData.Dependents.Zero);
                _bankDetails.ClickConfirmExpensesBtn();
                _bankDetails.ClickNoGovtBenefitsbtn();

                // Your Summary page
                _bankDetails.ClickAgreeAppSubmitBtn();
                _bankDetails.ClickConfirmSummaryBtn();

                // Id pages
                _bankDetails.CheckIdAuthorisationChkbx();
                _bankDetails.SelectIdTypeLst("Drivers Licence");
                _bankDetails.EnterIdDriversLicenceNameTxt("Brian123");
                _bankDetails.SelectIdDriversLicenceStateLst("QLD");
                _bankDetails.EnterIdDriversLicenceNumberTxt();
                _bankDetails.ClickIdSubmitBtn();

                // SMS Verification page
                if (loanamount > 2000)
                {
                    // Enter sms input
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamount, "NL");

                #region old code
                //// Application Finished page
                //_bankDetails.ClickLoanDashboardManual();

                //// Member Area page
                //_bankDetails.ClickFinalApproval();
                //_bankDetails.ClickSetup();

                //// Setup Loan page
                //_loanSetUpDetails.ClickSubmitBtn();

                //// Contract page
                //_loanSetUpDetails.Loancontract();
                //_loanSetUpDetails.ConfirmAcceptingContract();
                //_loanSetUpDetails.ClickOnAgreeBtn();

                //// Nimble Visa Prepaid Card page
                //_loanSetUpDetails.ClickNothanksBtn();

                //// Contract Signed page
                //_loanSetUpDetails.ClickLoanDashboard();

                //// Member Area page
                //_loanSetUpDetails.Logout();
                #endregion
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
            //finally
            //{
            //    _driver.Quit();
            //    _result.SendTestResultToDb(TestContext.CurrentContext, strMessage, _personalDetails.EmailID, starttime);
            //}
        }
Exemplo n.º 17
0
        public void TC167_Verifying_ANR2_NL(int loanamout, string strmobiledevice, string BankUsername, string BankPwd)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                // Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Click on Start Your Application Button
                _homeDetails.ClickStartApplictionBtn();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Households);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //Click on First POL to select
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households);
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households);
                    }

                    // Enter FirstPOLLoan Amount
                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }
                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(BankUsername, BankPwd);

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

                // Select Just checking option
                //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                //if (loanamout > 2000)
                //{
                //    // enter sms input as OTP
                //    if (_bankDetails.VerifySMSOTP())
                //        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                //}

                // Verify unsuccessful message
                string UnsuccessMsg = "Application unsuccessful";
                Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg));

                //verify DNQ Message
                string ActualDNQMessage = "You currently don't qualify for a Nimble loan.";
                Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage));

                #region commented

                //// Verify ApprovedAmount
                //Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount());

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

                //// Verify Funded Amount
                //Assert.IsTrue(_loanSetUpDetails.VerifyFundedAmount(loanamout), " Expected Requested Amount : " + loanamout + ". Observed Funded Amount : " + _loanSetUpDetails.VerifyFundedAmount());

                //if (GetPlatform(_driver))
                //{
                //    // Click on To Loan Dashboard Button
                //    _loanSetUpDetails.ClickMobileLoanDashboardBtn();

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

                //    //Logout
                //    _loanSetUpDetails.Logout();

                //}
                //else
                //{
                //    // Click on Loan Dashboard Button
                //    _loanSetUpDetails.ClickLoanDashboard();

                //    //Logout
                //    _loanSetUpDetails.Logout();
                //}

                #endregion
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 18
0
        public void TC106_VerifyingCSVImport_NL(int loanamout, string strmobiledevice)
        {
            try
            {
                strUserType = "NL";
                _driver     = _testengine.TestSetup(strmobiledevice);
                if (_driver != null)
                {
                    _homeDetails        = new HomeDetails(_driver, "NL");
                    _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                    _personalDetails    = new PersonalDetails(_driver, "NL");
                    _bankDetails        = new BankDetails(_driver, "NL");
                    _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                    // Click on Apply Button
                    _homeDetails.ClickApplyBtn();

                    // Click on Start Your Application Button
                    _homeDetails.ClickStartApplictionBtn();

                    bool hideshow = _homeDetails.CheckHideShow();
                    if (hideshow == true)
                    {
                        if (GetPlatform(_driver))
                        {
                            _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary);
                        }
                        else
                        {
                            _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary);
                        }
                    }
                    else
                    {
                        // Select Loan Value from Slide bar
                        _loanPurposeDetails.SelectLoanValue(loanamout);

                        //Click on First POL to select
                        _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                        if (GetPlatform(_driver))
                        {
                            // Select Purpose of loan
                            _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary);
                        }
                        else
                        {
                            // Select Purpose of loan
                            _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary);
                        }

                        // Enter FirstPOLLoan Amount
                        _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                        // Click on Continue Button
                        _loanPurposeDetails.ClickLoanPOLContinueBtn();
                    }

                    // entering personal details with overwrite values
                    PersonalDetailsDataObj _obj = new PersonalDetailsDataObj();

                    _obj.Have2SACCLoan = "No";

                    //_personalDetails.PopulatePersonalDetails();
                    _personalDetails.PopulatePersonalDetails(_obj);

                    // Click on checks out Continue Button
                    _personalDetails.ClickCheckoutContinueBtn();

                    // select Bank Name
                    _bankDetails.SelectBankLst(TestData.BankDetails.Induebank.IndueLtd);

                    // Confirm Bank Details
                    _bankDetails.EnterBankDetailsUploadCSV("702389", "123456789", "TestUser");

                    //Click on BankDetailsContinue button
                    _bankDetails.ClickBankDetailsContinueBtn();

                    // update bank statement
                    _bankDetails.UpdateBankstatement();

                    //Click on upload link
                    _bankDetails.ClickUploadLnk();

                    // FileUpload
                    string projectLoc   = Directory.GetCurrentDirectory();
                    string fileLocation = Path.Combine(projectLoc, "TestData\\BankStatementCSVUpload.csv");
                    // _bankDetails.FileUpload(fileLocation);

                    _bankDetails.UploadFile(fileLocation);

                    //Click Confirm UploadRBtn
                    _bankDetails.ClickConfirmUploadRBtn();

                    //Click Upload ContinueBtn
                    _bankDetails.ClickUploadContinueBtn();

                    // Select Category
                    _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                    // Select Just checking option
                    // _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                    if (loanamout > 0)
                    {
                        // enter sms input as OTP
                        if (_bankDetails.VerifySMSOTP())
                        {
                            _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                        }
                    }

                    // verify final review enabled and process setup functionality
                    _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
                }
            }
            catch (Exception ex)
            {
                strMessage += ex.Message;
                if (_driver != null)
                {
                    Assert.Fail(ex.Message);
                }
            }
        }
Exemplo n.º 19
0
        public void TC200_Verifying_Calculator_Duration_NL(int loanamout, string strmobiledevice)
        {
            starttime   = DateTime.Now;
            strMessage  = string.Format("\r\n\t " + TestContext.CurrentContext.Test.Name + " Starts");
            strUserType = "NL";

            try
            {
                _driver                = _testengine.TestSetup(strmobiledevice);
                _homeDetails           = new HomeDetails(_driver, "NL");
                _loanPurposeDetails    = new LoanPurposeDetails(_driver, "NL");
                _loanCalculatorDetails = new LoanCalculatorDetails(_driver, "NL");
                _personalDetails       = new PersonalDetails(_driver, "NL");
                _bankDetails           = new BankDetails(_driver, "NL");
                _loanSetUpDetails      = new LoanSetUpDetails(_driver, "NL");

                ResultDbHelper _resul = new ResultDbHelper();

                // TestContext _testcontext;
                strMessage += string.Format("\r\n\t Browser Launched");

                //Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Validating ONline calculator Visibility
                if (calculatorIsEnabled == "true")
                {
                    Assert.IsTrue(_loanCalculatorDetails.OnlineCalculatorVisibility(), "Expected Visibility of Online Calculator");
                }

                //Selecting the loan amount in calculator and verify returned values on calculator
                _loanCalculatorDetails.RequestLoanAmountDurationCalculation(loanamout);

                //Click on Start application
                _homeDetails.ClickStartApplictionBtn();

                // select POL and Amount
                _loanCalculatorDetails.SelectPOLandAmount(loanamout, TestData.POL.Households);

                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

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

                strMessage += string.Format("\r\n\t Dag bank Launched");
                // Select Category
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                // Select Just checking option
                //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // 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
                    {
                        //ClickOn Loan Dashboard...Manual Approval
                        _loanSetUpDetails.ClickLoanDashboardManual();

                        //click on Final Approve
                        _loanSetUpDetails.FinalApprove();

                        //Click Setup Button
                        _loanSetUpDetails.ClickSetup();
                    }
                }

                // Verify ApprovedAmount
                Assert.IsTrue(_loanSetUpDetails.VerifyApprovedLoan(loanamout), "Expected Requested Amount : " + loanamout + ". Observed Approved Amount : " + _loanSetUpDetails.GetApprovedamount());

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

                // Verify Funded Amount
                Assert.IsTrue(_loanSetUpDetails.VerifyFundedAmount(loanamout), " Expected Requested Amount : " + loanamout + ". Observed Funded Amount : " + _loanSetUpDetails.VerifyFundedAmount());

                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.º 20
0
        public void TC085_VerifyLoanwith_5POL_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountWith5POL(loanamout, TestData.POL.Eventcosts.Birthdayparty, TestData.POL.Households, TestData.POL.EducationFees, TestData.POL.Eventcosts.Christmasparty, TestData.POL.Eventcosts.Weddingattire);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmountWith5POL(loanamout, TestData.POL.Eventcosts.Birthdayparty, TestData.POL.Households, TestData.POL.EducationFees, TestData.POL.Eventcosts.Christmasparty, TestData.POL.Eventcosts.Weddingattire);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //select 5 pol
                    _loanPurposeDetails.EnterFivePOLRL(TestData.POL.Eventcosts.Birthdayparty, TestData.POL.EducationFees, TestData.POL.MedicalDentalexpenses, TestData.POL.Households, TestData.POL.Homerepairsorimprovements, loanamout);

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                //Fill Up all the required bank details and submits the application
                _bankDetails.bankFunctions(TestData.BankDetails.Dagbank, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD, TestData.IncomeCategory.PrimaryIncome, TestData.Dependents.Zero, TestData.SMSCode, loanamout);

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }

            #region commented old scenario
            //// 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();

            //    }
            //    else
            //    {
            //        // Click on Loan Dashboard Button
            //        _loanSetUpDetails.ClickLoanDashboard();

            //        //Logout
            //        _loanSetUpDetails.Logout();
            //    }
            //}
            //catch (Exception ex)
            //{
            //    strMessage += ex.Message; Assert.Fail(ex.Message);
            //}
            #endregion
        }
        public void VerifyInconsistencyIncome_NL(int loanamout, string income1, string income2, string mobiledevice, bool verification)
        {
            strUserType         = "NL";
            _driver             = _testengine.TestSetup(mobiledevice);
            _homeDetails        = new HomeDetails(_driver, "NL");
            _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
            _personalDetails    = new PersonalDetails(_driver, "NL");
            _bankDetails        = new BankDetails(_driver, "NL");
            _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

            try
            {
                // Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Click on Start Your Application Button
                _homeDetails.ClickStartApplictionBtn();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Households);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //Click on First POL to select
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households);
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households);
                    }

                    // Enter FirstPOLLoan Amount
                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                PersonalDetailsDataObj _dataObj = new PersonalDetailsDataObj
                {
                    StreetName = TestData.OverrideCodes.PassAll_NL
                };

                _personalDetails.PopulatePersonalDetails(_dataObj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                email = _personalDetails.EmailID;

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.SingleDI.Yodlee.UID, TestData.BankDetails.SingleDI.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.SelectIncomeCategDeposit1(TestData.IncomeCategory.PrimaryIncome);

                // Select Just checking option
                SelectIncome1Reason(income1);

                // Select Category
                _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.PrimaryIncome);

                //Verify if Reason is requested to specify
                Assert.IsTrue(_bankDetails.VerifySelectJustCheckingDeposit2IsDisplayed());

                // Select Category
                _bankDetails.SelectIncomeCategDeposit2(TestData.IncomeCategory.OtherEmployment);

                //Verify if Reason is requested to specify
                Assert.IsFalse(_bankDetails.VerifySelectJustCheckingDeposit2IsDisplayed());

                // 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();
                System.Threading.Thread.Sleep(2000);
                // enter sms input as OTP
                if (loanamout > 2000)
                {
                    _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                }

                if (((loanamout > 2000 && FinalReviewEnabled == "true") && (strUserType == FinalReviewLoanType || FinalReviewLoanType == "ALL")) || verification)
                {
                    //Click on Launch dashboard
                    _loanSetUpDetails.ClickLoanDashboardManual();

                    //Click on Final approval
                    _bankDetails.ClickFinalApproval();

                    //Click on setup
                    _bankDetails.ClickSetup();
                }

                // click on Buton Submit
                _loanSetUpDetails.ClickSubmitBtn();

                // Select Reason for Spend Less
                bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless();

                if (ReasonPageExists == true)
                {
                    _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct);
                }

                //  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();
                }
                else
                {
                    // Click on Loan Dashboard Button
                    _loanSetUpDetails.ClickLoanDashboard();

                    //Logout
                    _loanSetUpDetails.Logout();
                }
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 22
0
        public void TC172_Verify_Proviso_AccountTypes_Accepted_NL(int loanamout, string strmobiledevice, string BankUsername, string BankPwd, string AccountType)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households);

                PersonalDetailsDataObj _obj = new PersonalDetailsDataObj();

                _obj.StreetName = "At:N Cr:A Id:100 Rr1:A Rr2:A Rr3:A Bsp:BS Rmsrv:1";

                //populate the personal details and proceed
                _personalDetails.PopulatePersonalDetails(_obj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(BankUsername, BankPwd);

                // Click on Continue Button
                _bankDetails.ClickAutoContinueBtn();

                // choose bank account
                _bankDetails.BankAccountSelectBtn();

                // Bank Details - check presented masked values
                //Assert.IsTrue(_bankDetails.GetMaskedAccountType().Contains(AccountType));

                // Click on Bank select Continue Button
                _bankDetails.ClickBankAccountContBtn();

                // Confirm Bank Details
                // _bankDetails.EnterBankDetailsTxt();
                _bankDetails.EnterBankDetailsUploadCSV("012004", "01234567", "Testuser");

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

                // SMS Pin page (if applicable)
                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message); strMessage += ex.Message;
            }
        }
        public void TC122_VerifyingHasSACCNo_RePayNo_UptoDateYes_NimblePay_No_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = _testengine.TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                // Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Click on Start Your Application Button
                _homeDetails.ClickStartApplictionBtn();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.Eventcosts.Anniversary);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.Eventcosts.Anniversary);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //Click on First POL to select
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Eventcosts.Anniversary);
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Eventcosts.Anniversary);
                    }

                    // Enter FirstPOLLoan Amount
                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // entering personal details with overwrite values
                PersonalDetailsDataObj _obj = new PersonalDetailsDataObj();

                _obj.Have2SACCLoan = "No";

                //_personalDetails.PopulatePersonalDetails();
                _personalDetails.PopulatePersonalDetails(_obj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

                // select Bank Name
                _bankDetails.SelectBankLst(TestData.BankDetails.Dagbank);

                // Click on Continue Button
                _bankDetails.BankSelectContinueBtn();

                // Entering Username and Password
                _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.TwoOrmoreSACCLoans.Yodlee.UID, TestData.BankDetails.TwoOrmoreSACCLoans.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();

                // Verify Other short-term loans and select POL's
                _bankDetails.SelectPOLExistingSACC(TestData.POL.Households, TestData.POL.EducationFees);

                // Select Have you fully repaid previos loan - "No"
                _bankDetails.SelectFullyRepaidLoanbtn(false);

                //Select are you uptodate with repayment- "Yes"
                _bankDetails.SelectAreyouUpdatewithLoanBtn(true);

                //Select To use any of this Nimble loan to make these repayments - "NO"
                _bankDetails.SelectUseNimbletoRepayLoanBtn(false);

                // click on Confirm SACC continue button
                _bankDetails.ClickConfirmSACCNamesBtn();

                // Select Category
                _bankDetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                // Select Just checking option
                _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // if (loanamout > 2000 && FinalReviewEnabled == "true")
                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
                        _bankDetails.ClickSetup();

                        // click on Buton Submit
                        _loanSetUpDetails.ClickSubmitBtn();
                    }
                    else
                    {
                        //ClickOn Loan Dashboard...Manual Approval
                        _loanSetUpDetails.ClickLoanDashboardManual();

                        //click on Final Approve
                        _loanSetUpDetails.FinalApprove();

                        //Click Setup Button
                        _bankDetails.ClickSetup();

                        // click on Buton Submit
                        _loanSetUpDetails.ClickSubmitBtn();
                    }
                }
                else
                {
                    // click on Buton Submit
                    _loanSetUpDetails.ClickSubmitBtn();
                }

                // Select Reason for Spend Less
                bool ReasonPageExists = _loanSetUpDetails.FindandselectSpendless();

                if (ReasonPageExists == true)
                {
                    _loanSetUpDetails.SelectReasontospendLess(TestData.ReasonforspeandLess.cheaperproduct);
                }

                //  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();
                }
                else
                {
                    // Click on Loan Dashboard Button
                    _loanSetUpDetails.ClickLoanDashboard();

                    //Logout
                    _loanSetUpDetails.Logout();
                }
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 24
0
        public void TC011_VerifyWithMultiplePOL_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMultiplePOLMobile(loanamout, TestData.POL.Eventcosts.Birthdayparty, TestData.POL.Households);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmountMultiplePOL(loanamout, TestData.POL.Eventcosts.Birthdayparty, TestData.POL.Households);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //Click on First POL to select
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.Households);

                        // Enter FirstPOLLoan Amount
                        _loanPurposeDetails.EnterFirstPOLAmountTxt((loanamout / 2).ToString());

                        //Select click on second purpose of loan
                        _loanPurposeDetails.ClickSelectSecondPurposeBtn();

                        // Select  Second Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.EducationFees);

                        // Enter Second POL Loan Amount
                        _loanPurposeDetails.EnterSecondPOLAmountTxt((loanamout / 2).ToString());
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.Households);

                        // Enter FirstPOLLoan Amount
                        _loanPurposeDetails.EnterFirstPOLAmountTxt((loanamout / 2).ToString());

                        //Select click on second purpose of loan
                        _loanPurposeDetails.ClickSelectSecondPurposeBtn();

                        // Select  Second Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.EducationFees);

                        // Enter Second POL Loan Amount
                        _loanPurposeDetails.EnterSecondPOLAmountTxt((loanamout / 2).ToString());
                    }

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }
                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

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

                // Select Just checking option
                //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2600)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }

            #region commented old scenario

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

            //    }
            //    else
            //    {
            //        // Click on Loan Dashboard Button
            //        _loanSetUpDetails.ClickLoanDashboard();

            //        //Logout
            //        _loanSetUpDetails.Logout();
            //    }
            //}
            //catch (Exception ex)
            //{
            //    strMessage += ex.Message; Assert.Fail(ex.Message);
            //}
            #endregion
        }
Exemplo n.º 25
0
        public void TC177_Verify_Incorrect_SMS_PIN__NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                // Click on Apply Button
                _homeDetails.ClickApplyBtn();

                // Click on Start Your Application Button
                _homeDetails.ClickStartApplictionBtn();

                bool hideshow = _homeDetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanPurposeDetails.RequestLoanAmountMobile(loanamout, TestData.POL.TravelHoliday.Airline);
                    }
                    else
                    {
                        _loanPurposeDetails.RequestLoanAmount(loanamout, TestData.POL.TravelHoliday.Airline);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValue(loanamout);

                    //Click on First POL to select
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurposeMobile(TestData.POL.TravelHoliday.Airline);
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanPurposeDetails.SelectLoanPurpose(TestData.POL.TravelHoliday.Airline);
                    }

                    // Enter FirstPOLLoan Amount
                    _loanPurposeDetails.EnterFirstPOLAmountTxt(loanamout.ToString());

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtn();
                }

                // entering personal details with overwrite values
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

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

                // Select Just checking option
                //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.InvalidSMSCode);
                    }
                }

                //verify Incorrect PIN error message
                string expectedErrorMsgMobile  = "Incorrect PIN. Please try again.";
                string expectedErrorMsgDesktop = "Incorrect PIN. Please try again";
                Thread.Sleep(1000);
                if (GetPlatform(_driver))
                {
                    Assert.AreEqual(_loanSetUpDetails.VerifyIncorrectSMSPin(), expectedErrorMsgMobile);
                }
                else
                {
                    Assert.AreEqual(_loanSetUpDetails.VerifyIncorrectSMSPin(), expectedErrorMsgDesktop);
                }

                //Reenter valid SMS PIN
                _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 26
0
        public void TC084_VerifyManualApproval_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Utilitybills.Onebill);

                //MoreInformation
                _loanPurposeDetails.MoreInformation();

                //entering personal details
                _personalDetails.PopulatePersonalDetails();

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

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

                // Select Just checking option
                // _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                if (GetPlatform(_driver))
                {
                    //ClickOn Loan Dashboard...Manual Approval
                    bool flag = _loanSetUpDetails.ClickLoanDashboardManual();
                    Assert.IsTrue(flag, "Application went to manual approval");

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

                    // click on Approve button
                    _loanSetUpDetails.ClickApproveBtn();

                    //Click Setup Button
                    _bankDetails.ClickSetup();

                    // click on Buton Submit
                    _loanSetUpDetails.ClickSubmitBtn();
                }
                else
                {
                    //ClickOn Loan Dashboard...Manual Approval
                    bool flag = _loanSetUpDetails.ClickLoanDashboardManual();
                    Assert.IsTrue(flag, "Application went to manual approval");

                    //click on Final Approve
                    _loanSetUpDetails.FinalApprove();

                    //Click Setup Button
                    _bankDetails.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();
                }
                else
                {
                    // Click on Loan Dashboard Button
                    _loanSetUpDetails.ClickLoanDashboard();

                    //Logout
                    _loanSetUpDetails.Logout();
                }
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
        public void TC036_ApplyLoanwithEmploymentStausUnemployed_NL(int loanamout, string strmobiledevice, string UnEmpDesc)
        {
            strUserType         = "NL";
            _driver             = _testengine.TestSetup(strmobiledevice);
            _homeDetails        = new HomeDetails(_driver, "NL");
            _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
            _personalDetails    = new PersonalDetails(_driver, "NL");
            _bankDetails        = new BankDetails(_driver, "NL");
            _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

            try
            {
                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Households);

                // entering personal details with overwrite values
                PersonalDetailsDataObj obj = new PersonalDetailsDataObj();
                obj.EmploymentStatus = TestData.YourEmployementStatus.Unemployed;
                obj.UnemploymentDesc = UnEmpDesc;

                //_personalDetails.PopulatePersonalDetails();
                _personalDetails.PopulatePersonalDetails(obj);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

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

                // Verify unsuccessful message
                string UnsuccessMsg = "Application unsuccessful";
                Assert.IsTrue(_personalDetails.GetUnsuccessMessage().Contains(UnsuccessMsg));

                //verify DNQ Message
                string ActualDNQMessage = "You currently don't qualify for a Nimble loan";
                Assert.IsTrue(_personalDetails.GetDNQMessage().Contains(ActualDNQMessage));
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
        }
Exemplo n.º 28
0
        public void TC001_VerifyPOL_NL(int loanamout)
        {
            // Click on Apply Button
            _homeDetails.ClickApplyBtn();

            // Click on Start Your Application Button
            _homeDetails.ClickStartApplictionBtn();

            // Click on HideShowDebug Button
            _homeDetails.ClickHideShowDebugBtn();

            // Click on PassAllNobs Link
            _homeDetails.ClickPassAllNobslnk();

            // Select Purpose of loan
            _loanpurposedetails.SelectLoanPurpose(TestData.POL.Eventcosts.Birthdayparty);

            // Select Loan Value from Slide bar
            _loanpurposedetails.SelectLoanValue(loanamout);

            // Enter FirstPOLLoan Amount
            _loanpurposedetails.EnterFirstPOLAmountTxt(loanamout.ToString());

            // Click on Continue Button
            _loanpurposedetails.ClickLoanPOLContinueBtn();

            // Enter Email Details
            _personaldetails.EnterEmailTxt(_randomVal.RandomEmail());

            // Enter StreetName Details
            _personaldetails.EnterStreetNameTxt(TestData.OverrideCodes.Approved);

            // 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.NewLoaner);

            // Check Read Credit Guide
            _personaldetails.CheckReadCreditBtn(TestData.NewLoaner);

            // Click on Personal Details Continue Button
            _personaldetails.ClickPersonaldetailsContinueBtn();

            // Click on checks out Continue Button
            _personaldetails.ClickCheckoutContinueBtn();

            // select Bank Name
            _bankDetails.SelectBankLst(TestData.BankDetails.DAGbank.Dagbank);

            // Click on Continue Button
            _bankDetails.BankSelectContinueBtn();

            // Entering Username and Password
            _bankDetails.EnterBankCredentialsTxt(TestData.BankDetails.DAGbank.UID, TestData.BankDetails.DAGbank.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(TestData.BankDetails.DAGbank.BSB, TestData.BankDetails.DAGbank.AccountNumber, TestData.BankDetails.DAGbank.AccountName);

            // Click on Confirm account details Continue Button
            _bankDetails.ClickAcctDetailsBtn();

            // Select Category
            _bankDetails.SelectIncomeCategoryLst(TestData.IncomeCategory.PrimaryIncome);

            // Select Just checking option
            _bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

            // 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.ClickGovtBenefitsOptionLst();

            // click on Agree that information True
            _bankDetails.ClickAgreeAppSubmitBtn();

            // click on confirm Submit button
            _bankDetails.ClickConfirmSummaryBtn();

            // enter sms input as OTP
            _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);

            // Verify Loan Setup Text displayed
            _LoanSetUpDetails.VerifyDisplayedText();

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

            // Click on Loan Dashboard Button
            _LoanSetUpDetails.ClickLoanDashboard();
        }
Exemplo n.º 29
0
        public void TC009_VerifyPOLEventCost_NL(int loanamout, string strmobiledevice)
        {
            strUserType = "NL";
            try
            {
                _driver             = TestSetup(strmobiledevice);
                _homeDetails        = new HomeDetails(_driver, "NL");
                _loanPurposeDetails = new LoanPurposeDetails(_driver, "NL");
                _personalDetails    = new PersonalDetails(_driver, "NL");
                _bankDetails        = new BankDetails(_driver, "NL");
                _loanSetUpDetails   = new LoanSetUpDetails(_driver, "NL");

                //Go to the homepage and click the start application button
                _homeDetails.HomeDetailsPage();

                //Select the loan amount and purpose and click on continue button
                _loanPurposeDetails.LoanPurposeFunction(loanamout, TestData.POL.Eventcosts.Anniversary);

                //MoreInformation
                _loanPurposeDetails.MoreInformation();
                PersonalDetailsDataObj _per = new PersonalDetailsDataObj();
                _per.StreetName = "At:N Cr:A Id:100 Rr1:A Rr2:A Rr3:A Bsp:Y";

                //entering personal details
                _personalDetails.PopulatePersonalDetails(_per);

                // Click on checks out Continue Button
                _personalDetails.ClickCheckoutContinueBtn();

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

                // Select Just checking option
                //_bankDetails.SelectJustCheckingOptionLst("Yes, it will stay the same (or more)");

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

                if (loanamout > 2000)
                {
                    // enter sms input as OTP
                    if (_bankDetails.VerifySMSOTP())
                    {
                        _bankDetails.EnterOTPDetailsTxt(TestData.SMSCode);
                    }
                }

                // verify final review enabled and process setup functionality
                _loanSetUpDetails.loanSetupFunction(loanamout, strUserType);
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }

            #region commented old scenario

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

            //    }
            //    else
            //    {
            //        // Click on Loan Dashboard Button
            //        _loanSetUpDetails.ClickLoanDashboard();

            //        //Logout
            //        _loanSetUpDetails.Logout();
            //    }
            //}
            //finally
            //{

            //    _driver.Quit();
            //}
            #endregion
        }
Exemplo n.º 30
0
        public void TC079_VerifySTP_D_NL(int loanamount, string strdevice)
        {
            strUserType = "NL";
            _driver     = TestSetup(strdevice);

            _homedetails        = new HomeDetails(_driver, "NL");
            _loanpurposedetails = new LoanPurposeDetails(_driver, "NL");
            _personaldetails    = new PersonalDetails(_driver, "NL");
            _bankdetails        = new BankDetails(_driver, "NL");

            try
            {
                _homedetails.ClickApplyBtn();

                _homedetails.ClickStartApplictionBtn();

                bool hideshow = _homedetails.CheckHideShow();
                if (hideshow == true)
                {
                    if (GetPlatform(_driver))
                    {
                        _loanpurposedetails.RequestLoanAmountMobile(loanamount, TestData.POL.Households);
                    }
                    else
                    {
                        _loanpurposedetails.RequestLoanAmount(loanamount, TestData.POL.Households);
                    }
                }
                else
                {
                    // Select Loan Value from Slide bar
                    _loanpurposedetails.SelectLoanValue(loanamount);

                    //Click on First POL to select
                    _loanpurposedetails.ClickSelectFirstPurposeBtn();

                    if (GetPlatform(_driver))
                    {
                        // Select Purpose of loan
                        _loanpurposedetails.SelectLoanPurposeMobile(TestData.POL.Households);
                    }
                    else
                    {
                        // Select Purpose of loan
                        _loanpurposedetails.SelectLoanPurpose(TestData.POL.Households);
                    }

                    // Enter FirstPOLLoan Amount
                    _loanpurposedetails.EnterFirstPOLAmountTxt(loanamount.ToString());

                    // Click on Continue Button
                    _loanpurposedetails.ClickLoanPOLContinueBtn();
                }

                PersonalDetailsDataObj _personalDetailsData = new PersonalDetailsDataObj();

                TestUtility _testutility = new TestUtility();

                _personalDetailsData.StreetName = "At:N Cr:A Id:100 Bs1:P Rr1:A Rr2:D Rjs2:S Rr3:A Bsp:Y";

                _personalDetailsData.FirstName = _testutility.RandomString(8);

                _personaldetails.PopulatePersonalDetails(_personalDetailsData);

                _personaldetails.ClickCheckoutContinueBtn();

                _bankdetails.SelectBankLst(TestData.BankDetails.Dagbank);

                _bankdetails.BankSelectContinueBtn();

                _bankdetails.EnterBankCredentialsTxt(TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.UID, TestData.BankDetails.AUTOTriggerAllNoSACC.Yodlee.PWD);

                _bankdetails.ClickAutoContinueBtn();

                _bankdetails.BankAccountSelectBtn();

                _bankdetails.ClickBankAccountContBtn();

                _bankdetails.EnterBankDetailsTxt();

                _bankdetails.ClickAcctDetailsBtn();

                _bankdetails.SelectIncomecategory(TestData.IncomeCategory.PrimaryIncome, "0");

                _bankdetails.ClickConfirmIncomeBtn();

                _bankdetails.SelectOtherDebtRepaymentsOptionBtn();

                _bankdetails.SelectDependantsLst(TestData.Dependents.Zero);

                _bankdetails.ClickConfirmExpensesBtn();

                _bankdetails.ClickNoGovtBenefitsbtn();

                _bankdetails.ClickAgreeAppSubmitBtn();

                _bankdetails.ClickConfirmSummaryBtn();

                string strval = _personaldetails.GetDNQTxt();

                // Verify unsuccessful message
                string UnsuccessMsg = "Application unsuccessful";
                Assert.IsTrue(_personaldetails.GetUnsuccessMessage().Contains(UnsuccessMsg));

                //verify DNQ Message
                string ActualDNQMessage = "You currently don't qualify for a Nimble loan";
                Assert.IsTrue(_personaldetails.GetDNQMessage().Contains(ActualDNQMessage));
            }
            catch (Exception ex)
            {
                strMessage += ex.Message; Assert.Fail(ex.Message);
            }
            //finally
            //{
            //    _driver.Quit();
            //    _result.SendTestResultToDb(TestContext.CurrentContext, strMessage, _personaldetails.EmailID, starttime);
            //}
        }