Esempio n. 1
0
        public void InvalidAuthFieldInputErrors(string email, string password, string expectedErrorMessage)
        {
            headerNotAuthPage.ClickAuthButton();

            if (email.Length != 0)
            {
                authPage
                .ClickOnEmailField()
                .EmailUserEnter(email)
                .SighInButtonClick();
                String passwordError = wait.Until(e => e.FindElement(authPage.PasswordError)).Text;
                Assert.AreEqual(expectedErrorMessage, passwordError);
            }
            else
            {
                authPage
                .ClickOnPasswordField()
                .PasswordUserEnter(password)
                .SighInButtonClick();
                String emailErrorText = wait.Until(e => e.FindElement(authPage.EmailError)).Text;
                Assert.AreEqual(expectedErrorMessage, emailErrorText);
            }
        }