public virtual List <Customer> Search(CustomerSearchCriteria criteria) { NameTextBox().Text = criteria.Name; window.Get <TextBox>("ageTextBox").Text = criteria.Age; window.Get <Button>("search").Click(); TableRows rows = window.Get <Table>("foundCustomers").Rows; List <Customer> foundCustomers = new List <Customer>(); rows.ForEach(delegate(TableRow obj) { TableCells cells = obj.Cells; Customer customer = new Customer(cells["Name"].Value.ToString(), cells["Age"].Value.ToString(), cells["PhoneNumber"].Value.ToString()); foundCustomers.Add(customer); }); return(foundCustomers); }