private void SetRowField(TenderHoursRow row, string property, string value)
        {
            Type type = row.GetType();

            foreach (PropertyInfo info in type.GetProperties())
            {
                if (info.Name == property && info.CanWrite)
                {
                    info.SetValue(row, value, null);
                    break;
                }
            }
        }
        public IList <TenderHoursRow> BuildRows()
        {
            IList <TenderHoursRow> rowsToReturn = new List <TenderHoursRow>();
            TenderHoursRow         tenderHoursRow;

            foreach (IWebElement row in TenderHourGroupRows)
            {
                tenderHoursRow = new TenderHoursRow();
                IWebElement dayOfWeekElement = row.FindElement(tenderHoursLabel);
                IWebElement startTimeElement = row.FindElement(tenderHoursStart);
                IWebElement endTimeElement   = row.FindElement(tenderHoursEnd);
                SetRowField(tenderHoursRow, "DayOfWeek", dayOfWeekElement.Text);
                SetRowField(tenderHoursRow, "StartTime", startTimeElement.GetAttribute("value"));
                SetRowField(tenderHoursRow, "EndTime", endTimeElement.GetAttribute("value"));
                SetRowField(tenderHoursRow, "IsOpen", IsOpen(row).ToString());
                rowsToReturn.Add(tenderHoursRow);
            }
            return(rowsToReturn);
        }