//This method is used for User Logout
 public void LogOut()
 {
     try
     {
         Thread.Sleep(2000);
         UserCommonFunctions.ScrollingUpVertical(driver);
         UserSetFunctions.Click(driver.FindElement(loggedInUserName));
         UserSetFunctions.Click(driver.FindElement(userSignOutButton));
         logger.Info("User " + username + " logged out successfully");
     }
     catch (Exception e)
     {
         logger.Error("Logout failed");
         logger.Error(e.StackTrace);
         throw e;
     }
 }
Пример #2
0
 //This method is used for User Logout
 public void LogOut()
 {
     try
     {
         Thread.Sleep(2000);
         if (!driver.Url.EndsWith(Const.LoginText))
         {
             UserCommonFunctions.ScrollingUpVertical(driver);
             UserSetFunctions.Click(driver.FindElement(loggedInUserName));
             UserSetFunctions.Click(driver.FindElement(userSignOutButton));
             logger.LogCheckPoint(string.Format(LogMessage.UserLoggedOutSuccessfully, username));
         }
         Thread.Sleep(2000);
     }
     catch (Exception e)
     {
         logger.LogError(LogMessage.UserLogoutFailed, e);
         throw;
     }
 }