示例#1
0
        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);
     }
 }
示例#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());
         }
      }
示例#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());
         }
      }
示例#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);
         }
      }
示例#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);
            }
        }
示例#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);
            }
        }