public void SubmitLoanRequestForAmount(string loanAmount, string downPayment, string fromAccountId) { selenium.SendKeys(textfieldLoanAmount, loanAmount); selenium.SendKeys(textfieldDownPayment, downPayment); selenium.Select(dropdownFromAccountId, fromAccountId); selenium.Click(buttonApplyForLoan); }
public void StartBrowser_LoginAndPerformChecks_StopBrowser() { selenium.NavigateTo("http://parabank.parasoft.com"); selenium.SendKeys(By.Name("username"), "john"); selenium.SendKeys(By.Name("password"), "demo"); selenium.Click(By.XPath("//input[@value='Log In']")); selenium.Click(By.LinkText("Request Loan")); selenium.SendKeys(By.Id("amount"), "10000"); selenium.SendKeys(By.Id("downPayment"), "100"); selenium.Select(By.Id("fromAccountId"), "54321"); selenium.Click(By.XPath("//input[@value='Apply Now']")); Assert.AreEqual("Denied", selenium.GetElementText(By.Id("loanStatus"))); }
public void LoginAndRequestLoan() { new LoginPage(driver) .Load() .LoginAs("john", "demo"); new AccountsOverviewPage(driver) .SelectMenuItem("Request Loan"); /*** * Replace the methods below by the methods that you created * in the RequestLoanPage and RequestLoanResultPage Page Objects */ selenium.SendKeys(By.Id("amount"), "10000"); selenium.SendKeys(By.Id("downPayment"), "100"); selenium.Select(By.Id("fromAccountId"), "54321"); selenium.Click(By.XPath("//input[@value='Apply Now']")); Assert.AreEqual("Denied", selenium.GetElementText(By.Id("loanStatus"))); }