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")));
        }
Ejemplo n.º 3
0
        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']"));

            /***
             * Rewrite the actions below so they use the helper methods in the SeleniumHelpers class
             * You'll need to define one helper method yourself, to perform the dropdown select action
             * All other helpers you'll need are there already
             */

            driver.FindElement(By.LinkText("Request Loan")).Click();
            driver.FindElement(By.Id("amount")).SendKeys("10000");
            driver.FindElement(By.Id("downPayment")).SendKeys("100");
            SelectElement dropdownFromAccountId = new SelectElement(driver.FindElement(By.Id("fromAccountId")));

            dropdownFromAccountId.SelectByText("54321");
            driver.FindElement(By.XPath("//input[@value='Apply Now']")).Click();

            string result = driver.FindElement(By.Id("loanStatus")).Text;

            Assert.AreEqual("Denied", result);
        }
        public void StartBrowser_PerformGoogleSearch_AssertOnResultPage_StopBrowser()
        {
            selenium.NavigateTo("https://www.google.com");

            selenium.SendKeys(By.Name("q"), "Thomsons Online Benefits");

            selenium.Click(By.Name("btnK"));

            Assert.IsTrue(selenium.TitleIsEqualTo("Thomsons Online Benefits - Google zoeken"));

            Assert.IsTrue(selenium.ElementIsVisible(By.Id("resultStats")));
        }
Ejemplo n.º 5
0
        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")));
        }
 public void LoginAs(string username, string password)
 {
     selenium.SendKeys(textfieldUsername, username);
     selenium.SendKeys(textfieldPassword, password);
     selenium.Click(buttonDoLogin);
 }
Ejemplo n.º 7
0
 public void SelectMenuItem(string menuItemToSelect)
 {
     selenium.Click(By.LinkText(menuItemToSelect));
 }
 public AccountDetailsPage SelectAccount(string accountNumber)
 {
     SeleniumHelpers.Click(_driver, By.LinkText(accountNumber));
     return(new AccountDetailsPage(_driver));
 }
Ejemplo n.º 9
0
 public void ClickLogin()
 {
     SeleniumHelpers.Click(_driver, ButtonLogin);
 }
 public void ClickSearchButton()
 {
     selenium.Click(buttonDoSearch);
 }
Ejemplo n.º 11
0
 public void OpenAdminPage()
 {
     SeleniumHelpers.Click(_driver, LinkToAdminPage);
 }