public void LoginWithInvalidCredentials() { //prerare app.Auth.Logout(); //action AccountDate account = new AccountDate("admin", "desh"); app.Auth.Login(account); //verification Assert.IsFalse(app.Auth.IsLoggedIn(account)); }
public void Login(AccountDate account) { if (IsLoggedIn()) { if (IsLoggedIn(account)) { return; } Logout(); } Type(By.Name("user"), account.Username); Type(By.Name("pass"), account.Password); driver.FindElement(By.XPath("//input[@value='Login']")).Click(); }
public bool IsLoggedIn(AccountDate account) { return(IsLoggedIn() && GetLoggetUserName() == account.Username); }