Exemplo n.º 1
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.º 2
0
        public void TC106_VerifyingCSVImport_RL(int loanamout, string strmobiledevice)
        {
            try
            {
                strUserType = "RL";
                _driver     = _testengine.TestSetup(strmobiledevice, "RL");
                if (_driver != null)
                {
                    _homeDetails        = new HomeDetails(_driver, "RL");
                    _loanPurposeDetails = new LoanPurposeDetails(_driver, "RL");
                    _personalDetails    = new PersonalDetails(_driver, "RL");
                    _bankDetails        = new BankDetails(_driver, "RL");
                    _loanSetUpDetails   = new LoanSetUpDetails(_driver, "RL");

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

                    // Click on Request Money Button
                    _homeDetails.ClickRequestMoneyBtn();

                    //Click on Start Application Button
                    _homeDetails.ClickExistinguserStartApplictionBtn();

                    //Click on Select First POL Lst
                    _loanPurposeDetails.ClickSelectFirstPurposeBtn();

                    // Select Purpose of loan
                    _loanPurposeDetails.SelectLoanPurposeRL(TestData.POL.Eventcosts.Birthdayparty);

                    // Select Loan Value from Slide bar
                    _loanPurposeDetails.SelectLoanValueRL(loanamout);

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

                    // Click on Continue Button
                    _loanPurposeDetails.ClickLoanPOLContinueBtnRL();

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

                    // Check Read Credit Guide
                    _personalDetails.CheckReadCreditBtn(TestData.ReturnerLoaner);

                    if (GetPlatform(_driver))
                    {
                        // Click on Personal Details Continue Button
                        _personalDetails.ClickPersonaldetailsContinueBtnRLMobile();
                    }
                    else
                    {
                        // Click on Personal Details Continue Button
                        _personalDetails.ClickPersonaldetailsRequestBtnRLDesktop();

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

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

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

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

                    //Clicks the upload csv bank details continue button
                    _bankDetails.ClickVerifyManualOpenBtn();

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

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