示例#1
0
        public void LoginWithInvalidCredentials()
        {
            app.Auth.Logout();

            AccountData account = new AccountData("*****@*****.**", "qwerty");
            app.Auth.Login(account);

            Assert.IsFalse(app.Auth.IsLoggedIn(account));
        }
示例#2
0
        public void LoginWithValidCredentials()
        {
            app.Auth.Logout();

            AccountData account = new AccountData("*****@*****.**", "123456");
            app.Auth.Login(account);

            Assert.IsTrue(app.Auth.IsLoggedIn(account));
        }
示例#3
0
 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();
 }
示例#4
0
 public bool IsLoggedIn(AccountData account)
 {
     return(IsLoggedIn() &&
            GetLoggetUserName() == account.Username);
 }
示例#5
0
 public bool IsLoggedIn(AccountData account)
 {
     return(IsLoggedIn() && IsElementPresent(By.XPath($"//b[contains(text(),\'({account.Username})\')]")));
 }
示例#6
0
 private bool LoggedIn(AccountData account)
 {
     return(LoggedIn() &&
            driver.FindElement(By.CssSelector("form[name='logout'] b")).Text
            == "(" + account.Username + ")");
 }
示例#7
0
 public bool IsLoggedIn(AccountData account)
 {
     return(IsLoggedIn() &&
            driver.FindElement(By.Name("logout")).FindElement(By.TagName("b")).Text
            == "(" + account.Username + ")");
 }
示例#8
0
 public bool IsLoggedIn(AccountData data)
 {
     return(IsLoggedIn() &&
            GetLoggetUserName() == data.Username);
 }
示例#9
0
 public bool IsLoggedIn(AccountData account)
 {
     return IsLoggedIn()
         && GetLoggetUserName() == account.UserName;
 }