public void LoginWithInvalidCredentials() { app.Auth.Logout(); AccountData account = new AccountData("*****@*****.**", "qwerty"); app.Auth.Login(account); Assert.IsFalse(app.Auth.IsLoggedIn(account)); }
public void LoginWithValidCredentials() { app.Auth.Logout(); AccountData account = new AccountData("*****@*****.**", "123456"); app.Auth.Login(account); Assert.IsTrue(app.Auth.IsLoggedIn(account)); }
public void Login(AccountData account) { if (IsLoggedIn()) { if (IsLoggedIn(account)) { return; } Logout(); } driver.FindElement(By.LinkText("Sign In")).Click(); driver.FindElement(By.Id("identity")).Clear(); driver.FindElement(By.Id("identity")).SendKeys(account.Email); driver.FindElement(By.Id("password")).Clear(); driver.FindElement(By.Id("password")).SendKeys(account.Password); driver.FindElement(By.CssSelector("button.plaxo-button.signin-button")).Click(); }
public bool IsLoggedIn(AccountData account) { return(IsLoggedIn() && GetLoggetUserName() == account.Username); }
public bool IsLoggedIn(AccountData account) { return(IsLoggedIn() && IsElementPresent(By.XPath($"//b[contains(text(),\'({account.Username})\')]"))); }
private bool LoggedIn(AccountData account) { return(LoggedIn() && driver.FindElement(By.CssSelector("form[name='logout'] b")).Text == "(" + account.Username + ")"); }
public bool IsLoggedIn(AccountData account) { return(IsLoggedIn() && driver.FindElement(By.Name("logout")).FindElement(By.TagName("b")).Text == "(" + account.Username + ")"); }
public bool IsLoggedIn(AccountData data) { return(IsLoggedIn() && GetLoggetUserName() == data.Username); }
public bool IsLoggedIn(AccountData account) { return IsLoggedIn() && GetLoggetUserName() == account.UserName; }