public void TC027_ApplyLoanwithRepaymentAmountLowest_NL(int loanamout, string strmobiledevice) { 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); //populate the personal details and proceed _personalDetails.PersonalDetailsFunction(); //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); // loan set up page _loanSetUpDetails.VerifySetUpPageDetails(7, loanamout, loanamout, strUserType); _loanSetUpDetails.MoveSliderLowestAmount(); Thread.Sleep(2000); // wait until slider moves to lower double RepaymentAmountNow = _loanSetUpDetails.getRepAmtInTableMiddle(); //var expDefaultDate = _loanSetUpDetails.GetBusinessDay(DateTime.Now.AddDays(7)); var expDefaultDateString = _loanSetUpDetails.getSliderFirstRepaymentDate(); DateTime expDefaultDate = DateTime.ParseExact(expDefaultDateString, "d/MM/yyyy", null); _loanSetUpDetails.ClickDetailedrepaymentSchedulereopen(); string[,] details = _loanSetUpDetails.Getrepaymentdetails(); double lastrepay = Convert.ToDouble(details[details.GetLength(0) - 1, 1]); if (loanamout > 2000) { _loanSetUpDetails.CalcluateSolver(loanamout, expDefaultDate, 7, Convert.ToDouble(details[0, 1]), details.GetLength(0), lastrepay); } else { _loanSetUpDetails.CalculateSAAC(loanamout, 7, details); } // 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(); } // 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 }