public void TC002_VerifyingEmptyEmployeeOracleID(string strmobiledevice)
        {
            starttime  = DateTime.Now;
            strMessage = string.Format("\r\n\t " + TestContext.CurrentContext.Test.Name + " Starts");

            try
            {
                _driver      = _testengine.TestSetup(strmobiledevice);
                _homescreen1 = new HomeScreen1(_driver, "NR");

                ResultDbHelper _resul = new ResultDbHelper();

                // enter FirstName
                //_homescreen1.EnterFirstName();

                bool attrvalueempID = _homescreen1.GetEmployeeIDFieldStyle();
                Assert.IsTrue(attrvalueempID);

                bool attrvaluefName = _homescreen1.GetFirstNameFieldStyle();
                Assert.IsTrue(attrvaluefName);

                bool attrvaluelName = _homescreen1.GetLastNameFieldStyle();
                Assert.IsTrue(attrvaluelName);

                bool attrvalueemail = _homescreen1.GetEmailFieldStyle();
                Assert.IsTrue(attrvalueemail);

                bool attrvaluephone = _homescreen1.GetPhoneFieldStyle();
                Assert.IsTrue(attrvaluephone);

                bool attrvaluereturnoption = _homescreen1.GetReturnOptionFieldStyle();
                Assert.IsTrue(attrvaluereturnoption);

                // click on Next button
                _homescreen1.ClickNextBtn();

                ExtentReport.ReportPass(TestContext.CurrentContext.Test.FullName);
            }
            catch (Exception ex)
            {
                strMessage += ex.Message;
                ExtentReport.ReportFail(ex.Message);
                _xml.FailureTests(TestContext.CurrentContext.Test.FullName);
                _xml.FailurePlaylist(TestContext.CurrentContext.Test.FullName);
                Assert.Fail(ex.Message);
            }
        }
Пример #2
0
        public void TC001_VerifyPOL_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");
                _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();

                // 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.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 ApprovedAmount
                _loanSetUpDetails.VerifySetUpPageDetails(7, loanamout, loanamout, strUserType);

                // 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);
            }
        }
Пример #3
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);
            }
        }
Пример #4
0
        public void TC078_VerifyAML_DriversLicense_NL_AML1Reject_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");

            ResultDbHelper _result = new ResultDbHelper();

            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("Drivers Licence");
                _bankDetails.EnterIdDriversLicenceNameTxt("Brian123");
                _bankDetails.SelectIdDriversLicenceStateLst("QLD");
                _bankDetails.EnterIdDriversLicenceNumberTxt();
                _bankDetails.ClickIdSubmitBtn();

                //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
                // System could not ID person, person added to outbound contact queue to confirm details
                _loanSetUpDetails.Logout();
            }
            catch (Exception ex)
            {
                Assert.Fail(ex.Message);
                strMessage += ex.Message;
            }
            //finally
            //{
            //    _driver.Quit();
            //    _result.SendTestResultToDb(TestContext.CurrentContext, strMessage, _homeDetails.RLEmailID, starttime);
            //}
        }