Пример #1
0
        public void ThenButtonShouldBeVisible()
        {
            By        composeButtonBy = By.XPath("//div[contains(text(),'COMPOSE')]");
            LogInForm logInForm       = new LogInForm();

            logInForm.WaitTillElementIsVisible(composeButtonBy);
            Logger.Configure();
            Log.Information("Compose button should be displayed");
        }
Пример #2
0
        public void ThenISeeErrorMessage()
        {
            By        errorMessage = By.XPath("//div[contains(text(),'Wrong password')]");
            LogInForm logInForm    = new LogInForm();

            logInForm.WaitTillElementIsVisible(errorMessage);

            bool doesErrorMessageDisplayed = logInForm.ErrorMessage.Displayed;

            Assert.IsTrue(doesErrorMessageDisplayed, $"Error message is not displayed after input incorrect password");

            Logger.Configure();
            Log.Information("Error message should be displayed");
        }
Пример #3
0
        public void WhenILogInWithInvalid(string login, string password)
        {
            By        passwordInputBy = By.CssSelector("input[type = 'password']");
            LogInForm logInForm       = new LogInForm();

            //Enter credentials
            logInForm.LogInInput.SendKeys(login);
            logInForm.NextEmailButton.Click();

            logInForm.WaitTillElementIsVisible(passwordInputBy);
            logInForm.PasswordInput.SendKeys(password);
            logInForm.NextPasswordButton.Click();
            Logger.Configure();
            Log.Information($"I login with the invalid credentials: {login} / {password}");
        }