public void Clear() { for (int i = 0; i < Connections.Count; i++) { Connections[i].DbConnection.Dispose(); Connections[i].DbConnection = null; } Alias.Clear(); Connections.Clear(); Index = -1; }
public CategoryPageModel RegisterAccount() { Title.Click(); FirstName.SendKeys(SendKeysValues.FirstName); LastName.SendKeys(SendKeysValues.LastName); Password.SendKeys(SendKeysValues.Password); new SelectElement(Days).SelectByValue(SendKeysValues.Days); new SelectElement(Months).SelectByValue(SendKeysValues.Months); new SelectElement(years).SelectByValue(SendKeysValues.Year); NewsLetter.Click(); Option.Click(); Address.SendKeys(SendKeysValues.Address); City.SendKeys(SendKeysValues.City); new SelectElement(State).SelectByValue(SendKeysValues.State); PostalCode.SendKeys(SendKeysValues.PostalCode); MobilePhone.SendKeys(SendKeysValues.MobilePhone); Alias.Clear(); Alias.SendKeys(SendKeysValues.Alias); Register.Click(); Console.WriteLine("User Successfully Registered"); return(new CategoryPageModel()); }