public void MultiDebtID_paymentarrangement() { tranche = new TrancheTestcase(TrancheTestcase.TestCase.Create, 708); debt = new DebtTestcase(DebtTestcase.TestCase.New, tranche.TrancheID); debtor1 = new DebtorDetailTestcase(DebtorDetailTestcase.TestCase.BasicFemale); debtor2 = new DebtorDetailTestcase(DebtorDetailTestcase.TestCase.BasicMale); DebtorDetail1 = new DebtDebtorsDetailTestCase(DebtDebtorsDetailTestCase.TestCase.PrimaryDebtor, debt.DebtID, debtor1.debtorID, 1); DebtorDetail2 = new DebtDebtorsDetailTestCase(DebtDebtorsDetailTestCase.TestCase.PrimaryDebtor, debt.DebtID, debtor2.debtorID, 2); accessor.Open(string.Format(@"{0}/DebtDebtorDetails/Debt/{1}", accessor.BaseURL, debt.DebtID)); accessor.Close(); }
public void TestInit() { tranche = new TrancheTestcase(TrancheTestcase.TestCase.Create, 708); debt = new DebtTestcase(DebtTestcase.TestCase.New, tranche.TrancheID); debtor = new DebtorDetailTestcase(DebtorDetailTestcase.TestCase.BasicMale); debtDebtorsDetail = new DebtDebtorsDetailTestCase(DebtDebtorsDetailTestCase.TestCase.PrimaryDebtor, debt.DebtID, debtor.debtorID, 1); //accessor.Open(string.Format(@"{0}DebtDebtorDetails/debt/{1}", accessor.BaseURL, debt.DebtID)); //accessor.WaitForElementToBeDisplayed(string.Format("Debt{0}", debt.DebtID), 10); // Main debt tab accessor.Open(string.Format(@"{0}/DebtDebtorDetails/Debt/{1}", accessor.BaseURL, debt.DebtID)); accessor.ClickTab(string.Format("#debt{0}PaymentArrangementsTab", debt.DebtID)); IWebElement addPaymentWizard = accessor.GetElementByXPath(string.Format("//div[@collapsible-panel='debt{0}PaymentArrangementsPanel']//button[@ng-click='arrangementsCtrl.addArrangementViaWizard($event)']", debt.DebtID)); addPaymentWizard.Click(); IWebElement part = accessor.GetElementByXPath("//*[@id='arrangementTypePage']/div[1]/div[3]/div/div/label/strong"); part.Click(); IWebElement nextbttn = accessor.GetElementByXPath(string.Format("//button[@ng-click='arrangementCtrl.nextPage()']")); accessor.ClickElement(nextbttn); IWebElement paymentmethod = accessor.GetElementByID("paymentMethodID"); accessor.ClickElement(paymentmethod); accessor.SetSelectedOption(paymentmethod, "Direct Debit"); accessor.ClickElement(nextbttn); var bankaccount = accessor.GetElementByXPath("//*[@id='bankAccountPage']/div[2]/div[1]/div/div/label"); bankaccount.Click(); var BSB = accessor.GetElementByID("BSB"); BSB.Click(); accessor.SetNewElement(BSB, "980600"); var accountnumber = accessor.GetElementByID("accountNumber"); accountnumber.Click(); accessor.SetElementValue(accountnumber, "123456"); var accountname = accessor.GetElementByID("accountName"); accountname.Click(); accessor.SetElementValue(accountname, "TEST"); accessor.ClickElement(nextbttn); accessor.ClickElement(nextbttn); var next = accessor.GetElementByXPath("//*[@id='emailCorrespondencePage']/div[2]/div/div/label"); next.Click(); var emailID = accessor.GetElementByID("email"); accessor.SetElementValue(emailID, "*****@*****.**"); accessor.ClickElement(nextbttn); var nextbutton = accessor.GetElementByID("paWizardNextBtn"); nextbutton.Click(); accessor.ClickElement(nextbttn); IWebElement Createpayment = accessor.GetElementByID("paWizardFinishBtn"); accessor.ClickElement(Createpayment); System.Threading.Thread.Sleep(2000); accessor.Save(); System.Threading.Thread.Sleep(2000); accessor.RefreshPage(); }