Exemplo n.º 1
0
        public void IfEmailAddressIsMissing_ShowValidationMessage()
        {
            using (var driver = new ChromeDriver())
            {
                var displayed = new LoginPage(driver)
                    .Navigate()
                    .Submit()
                    .EmailErrorMessage().Displayed;

                Assert.True(displayed);
            }
        }
Exemplo n.º 2
0
 public void IfEmailAddressIsNotValid_ShowValidationMessage()
 {
     using (var driver = new ChromeDriver())
     {
         var displayMessage = new LoginPage(driver)
             .Navigate()
             .SublitButtonClick()
             .GetloginErrorMessage()
             .Displayed;
         Assert.True(displayMessage);
     }
 }
Exemplo n.º 3
0
 public void IfEmailAddressIsValid_ShowValidationMessage()
 {
     using (var driver = new ChromeDriver())
     {
         var errorMessage = new LoginPage(driver)
             .Navigate()
             .SetEmailField("testemail")
             .SublitButtonClick()
             .GetloginErrorMessage()
             .Text;
   
         Assert.AreEqual(EmailIsNotValidMessage, errorMessage);
     }
 }
Exemplo n.º 4
0
      public void IfPasswordIsValid_NotShowLoginErrorMessage()
      {
         using (var driver = new ChromeDriver())
         {

            var lp = new LoginPage(driver)
               .Navigate()
               .PasswordInput(ValidPass)
               .SubmitButton();

            Assert.Throws<NoSuchElementException>(
               () => lp.PasswordErrorMessage());
         }
      }
Exemplo n.º 5
0
      public void IfEmailAddressIsValid_NotShowLoginErrorMessage()
      {
         using (var driver = new ChromeDriver())
         {

            var lp = new LoginPage(driver)
               .Navigate()
               .EmailInput(ValidEmail)
               .SubmitButton();

            Assert.Throws<NoSuchElementException>(
               () => lp.EmailErrorMessage());
         }
      }
Exemplo n.º 6
0
      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);
         }
      }
Exemplo n.º 7
0
        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);
            }
        }
Exemplo n.º 8
0
        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);
            }
        }