private UsersPage SearchUser(string userName) { UsersPage usersPage = homepage.GotoUsersPage(); usersPage.WaitForPageToLoad(); usersPage.FindText(userName); return(usersPage); }
public void DisbleUsersFromCSV(string filename) { string[] users = System.IO.File.ReadAllLines(filename); homepage = Host.Instance.NavigateToInitialPage <HomePage>(); LoginToSourcebox(); foreach (string data in users) { string userName = data.Trim().ToLower(); // sourcebox site automatically lowering the case. if (userName.Length != 0) { Console.WriteLine("\nProcessing user: {0}", userName); UsersPage usersPage = SearchUser(userName); usersPage.ChangeUserState(false); } } homepage.GotoLogoutPage(); Console.WriteLine("\n"); }