public void RegistrationFormScenarioTest() { PropertiesCollection.driver.Navigate().GoToUrl("http://testing.todorvachev.com"); HomePageObject homePage = new HomePageObject(); TestScenariosPageObject testScenariosPage = new TestScenariosPageObject(); RegistrationFormPageObject registrationFormPage = new RegistrationFormPageObject(); testScenariosPage = homePage.ClickTestScenariosPage(); registrationFormPage = testScenariosPage.ClickRegistrationFormPage(); registrationFormPage.txtUserID.SendKeys("IDeeeee"); registrationFormPage.txtPassword.SendKeys("password"); registrationFormPage.txtName.SendKeys("Mynamee"); Assert.AreEqual(SeleniumGetMethods.GetText(registrationFormPage.txtUserID), "IDeeeee"); Assert.AreEqual(SeleniumGetMethods.GetText(registrationFormPage.txtPassword), "password"); Assert.AreEqual(SeleniumGetMethods.GetText(registrationFormPage.txtName), "Mynamee"); }
public void LoginFormScenarioTest() { PropertiesCollection.driver.Navigate().GoToUrl("http://testing.todorvachev.com"); HomePageObject homePage = new HomePageObject(); TestScenariosPageObject testScenariosPage = new TestScenariosPageObject(); LoginFormPageObject loginFormPage = new LoginFormPageObject(); testScenariosPage = homePage.ClickTestScenariosPage(); loginFormPage = testScenariosPage.ClickLoginFormPage(); loginFormPage.txtUsername.SendKeys("MEE"); loginFormPage.txtPassword.SendKeys("password"); loginFormPage.txtRepeatPassword.SendKeys("password1"); Assert.AreEqual(SeleniumGetMethods.GetText(loginFormPage.txtUsername), "MEE"); Assert.AreEqual(SeleniumGetMethods.GetText(loginFormPage.txtPassword), "password"); Assert.AreEqual(SeleniumGetMethods.GetText(loginFormPage.txtRepeatPassword), "password1"); }