public void LoginAndFillCheckSite() { PropertiesCollection.driver.Navigate().GoToUrl("http://executeautomation.com/demosite/Login.html"); LoginPageObject pageLogin = new LoginPageObject(); EAPageObject pageEA = pageLogin.Login("execute", "automation"); WebDriverWait wait = new WebDriverWait(PropertiesCollection.driver, TimeSpan.FromSeconds(15)); IWebElement input = wait.Until <IWebElement>(d => d.FindElement(By.Name("TitleId"))); pageEA.FillFullForm("Mr.", "MD", "Maats", "Dijk"); IWebElement element = PropertiesCollection.driver.FindElement(By.Name("TitleId")); Assert.AreEqual(SeleniumGetMethods.GetTextFromDDL(element), "Mr.", "Wrong prefix chosen"); element = PropertiesCollection.driver.FindElement(By.Name("Initial")); Assert.AreEqual(SeleniumGetMethods.GetText(element), "MD"); element = PropertiesCollection.driver.FindElement(By.Name("FirstName")); Assert.AreEqual(SeleniumGetMethods.GetText(element), "Maats"); element = PropertiesCollection.driver.FindElement(By.Name("MiddleName")); Assert.AreEqual(SeleniumGetMethods.GetText(element), "Dijk"); }
public void LoginAndFillAutomationSite() { PropertiesCollection.driver.Navigate().GoToUrl("http://executeautomation.com/demosite/Login.html"); LoginPageObject pageLogin = new LoginPageObject(); EAPageObject pageEA = pageLogin.Login("execute", "automation"); pageEA.FillFullForm("Mr.", "MD", "Maats", "Dijk"); }