private void NavigateAndLogin() { new HomePage(Driver).ClickFormAuthenticationLink(); FormAuthenticationPage form = new FormAuthenticationPage(Driver); form.EnterUsername("tomsmith"); form.EnterPassword("SuperSecretPassword!"); form.ClickSubmit(); }
public void ShouldTryLoginWithInvalidCredentials() { new HomePage(Driver).ClickFormAuthenticationLink(); FormAuthenticationPage form = new FormAuthenticationPage(Driver); form.EnterUsername("Peeter-Eeter Termomeeter"); form.EnterPassword("CorrectHorseBatteryStaple"); form.ClickSubmit(); form.IsErrorNotificationDisplayed().Should().BeTrue(); }
public void ShouldLoginWithValidCredentials() { new HomePage(Driver).ClickFormAuthenticationLink(); FormAuthenticationPage form = new FormAuthenticationPage(Driver); form.EnterUsername("tomsmith"); form.EnterPassword("SuperSecretPassword!"); form.ClickSubmit(); form.IsSuccessNotificationDisplayed().Should().BeTrue(); }
public void FormAuthenticationPageTest(IDictionary<string, string> parameters) { new InternetPage(this.DriverContext).OpenHomePage().GoToFormAuthenticationPage(); var formFormAuthentication = new FormAuthenticationPage(this.DriverContext); formFormAuthentication.EnterUserName(parameters["user"]); formFormAuthentication.EnterPassword(parameters["password"]); formFormAuthentication.LogOn(); Verify.That( this.DriverContext, () => Assert.AreEqual(parameters["message"], formFormAuthentication.GetMessage)); }
public void Exercise_5_Test() { // TODO: Add your test code here var internetPage = new InternetPage(this.DriverContext); internetPage.OpenHomePage(); internetPage.GoToPage("login"); var formFormAuthentication = new FormAuthenticationPage(this.DriverContext); formFormAuthentication.EnterUserName(BaseConfiguration.Username); formFormAuthentication.EnterPassword(BaseConfiguration.Password); formFormAuthentication.LogIn(); Assert.AreEqual("You logged into a secure area!", formFormAuthentication.GetMessageSecure()); }
public void FormAuthenticationPageTestCSV(IDictionary <string, string> parameters) { var basicAuthPage = new InternetPage(this.DriverContext); basicAuthPage.OpenHomePage(); basicAuthPage.GoToPage("login"); var formFormAuthentication = new FormAuthenticationPage(this.DriverContext); formFormAuthentication.EnterUserName(parameters["user"]); formFormAuthentication.EnterPassword(parameters["password"]); formFormAuthentication.LogIn(); Verify.That( this.DriverContext, () => Assert.AreEqual(parameters["message"], formFormAuthentication.GetMessageSecure())); }