/// <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 "); } }
/// <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 }