示例#1
0
 /// <summary>
 /// Goes to admin panel and authorize
 /// </summary>
 public void SignIn_in_admin_panel(string email, string password)
 {
     _driverCover.NavigateToUrl(_driverCover.BaseAdminUrl);
     if (_driverCover.Driver.FindElements(By.CssSelector("#current_user")).Count == 0)
     {
         LoginObj login = new LoginObj(_driver);
         login.LogIn(email, password);
     }
     else
     {
         throw new Exception("Sorry but a user is already signed in ");
     }
 }
示例#2
0
        /// <summary>
        /// Goes to admin panel and authorizes
        /// </summary>
        public void SignIn_in_admin_panel()
        {
            _driverCover.NavigateToUrl(_driverCover.BaseAdminUrl);
            if (_driverCover.Driver.FindElements(By.CssSelector("#current_user")).Count == 0)
            {
                LoginObj login = new LoginObj(_driver);
                login.LogIn(ConfigurationManager.AppSettings["AdminLogin"], ConfigurationManager.AppSettings["AdminPassword"]);
            }

            //else already signed in
        }