Beispiel #1
0
        public void LoginWithInValidCredentials()
        {
            app.Auth.Logout();
            Class1_AccountData account = new Class1_AccountData("0000", "12345");

            app.Auth.Login(account);

            Assert.IsFalse(app.Auth.IsLoggedIn(account));
        }
Beispiel #2
0
        public void LoginWithValidCredentials()
        {
            app.Auth.Logout();
            Class1_AccountData account = new Class1_AccountData("admin", "secret");

            app.Auth.Login(account);

            Assert.IsTrue(app.Auth.IsLoggedIn(account));
        }
Beispiel #3
0
        public loginHelper Login(Class1_AccountData account)
        {
            if (IsLoggedIn())
            {
                if (IsLoggedIn())
                {
                    return(this);
                }
                Logout();
            }
            Type(By.Name("user"), account.Username);
            Type(By.Name("pass"), account.Password);
            driver.FindElement(By.XPath("//input[@value='Login']")).Click();

            return(this);
        }
Beispiel #4
0
 public bool IsLoggedIn(Class1_AccountData account)
 {
     return(IsLoggedIn() &&
            GetLoggetUserName() == account.Username);
 }