public void IfEmailAddressIsMissing_ShowValidationMessage() { using (var driver = new ChromeDriver()) { var displayed = new LoginPage(driver) .Navigate() .Submit() .EmailErrorMessage().Displayed; Assert.True(displayed); } }
public void IfEmailAddressIsNotValid_ShowValidationMessage() { using (var driver = new ChromeDriver()) { var displayMessage = new LoginPage(driver) .Navigate() .SublitButtonClick() .GetloginErrorMessage() .Displayed; Assert.True(displayMessage); } }
public void IfEmailAddressIsValid_ShowValidationMessage() { using (var driver = new ChromeDriver()) { var errorMessage = new LoginPage(driver) .Navigate() .SetEmailField("testemail") .SublitButtonClick() .GetloginErrorMessage() .Text; Assert.AreEqual(EmailIsNotValidMessage, errorMessage); } }
public void IfPasswordIsValid_NotShowLoginErrorMessage() { using (var driver = new ChromeDriver()) { var lp = new LoginPage(driver) .Navigate() .PasswordInput(ValidPass) .SubmitButton(); Assert.Throws<NoSuchElementException>( () => lp.PasswordErrorMessage()); } }
public void IfEmailAddressIsValid_NotShowLoginErrorMessage() { using (var driver = new ChromeDriver()) { var lp = new LoginPage(driver) .Navigate() .EmailInput(ValidEmail) .SubmitButton(); Assert.Throws<NoSuchElementException>( () => lp.EmailErrorMessage()); } }
public void IfEmailAddressIsNotValid_ShowLoginErrorMessage() { using (var driver = new ChromeDriver()) { var lp = new LoginPage(driver) .Navigate() .EmailInput(InvalidEmail) .SubmitButton(); var loginErrorMessage = lp.EmailErrorMessage(); Assert.AreEqual(loginErrorMessage.Text, InvalidErrorEmailMessage); } }
public void IfPasswordIsNull_ShowErrorMessage() { using (var driver = new ChromeDriver()) { LoginPage loginPage = new LoginPage(driver); loginPage.Navigate().EmailInput().SendKeys("*****@*****.**"); var displayed = loginPage .Navigate() .Submit() .PasswordErrorMessage() .Displayed; Assert.True(displayed); } }
public void IfEmailAddressIsNotValid_ShowValidationMessage() { using (var driver = new ChromeDriver()) { var loginPage = new LoginPage(driver); loginPage.Navigate(); var emailImput = loginPage.EmailInput(); emailImput.SendKeys("xxx"); loginPage .Submit(); var loginErrorMessage = loginPage.EmailErrorMessage(); Assert.True(loginErrorMessage.Displayed); } }