Esempio n. 1
0
        public void LoginWithInvalidCredentials()
        {
            //prepare
            app.Auth.Logout();

            // action
            AccauntData accaunt = new AccauntData("admin", "123456");

            app.Auth.Login(accaunt);

            //verification
            Assert.IsFalse(app.Auth.IsLoggedIn(accaunt));
        }
Esempio n. 2
0
        public void Login(AccauntData account)
        {
            if (IsLoggedIn())
            {
                if (IsLoggedIn(account))
                {
                    return;
                }

                Logout();
            }
            Type(By.Name("user"), account.Username);
            Type(By.Name("pass"), account.Password);
            driver.FindElement(By.CssSelector("input[type=\"submit\"]")).Click();
        }
Esempio n. 3
0
 public bool IsLoggedIn(AccauntData account)
 {
     return(IsLoggedIn() &&
            getLoggerUserName() == account.Username);
 }