Exemplo 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));
        }
Exemplo 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();
        }
Exemplo n.º 3
0
 public bool IsLoggedIn(AccauntData account)
 {
     return(IsLoggedIn() &&
            getLoggerUserName() == account.Username);
 }