/// <summary>
 /// Gets the OperationTemplate
 /// </summary>
 /// <returns>text</returns>
 public string GetOperationTemplates()
 {
     OperationTemplates.Wait(2);
     if (Driver.GetType() == typeof(DummyDriver))
     {
         OperationTemplates.Text = FakeText;
     }
     return(OperationTemplates.Text.Trim());
 }
        public void GenerateSpreadsheet(OperationTemplates template, string outputLocation, Results data)
        {
            var templatePath = GetTemplate(template);
            using (ExcelHelper helper = new ExcelHelper(templatePath, outputLocation))
            {
                helper.Direction = ExcelHelper.DirectionType.TOP_TO_DOWN;
                helper.CurrentSheetName = "Sheet1";
                helper.CurrentPosition = new CellRef("A1");
                helper.InsertRange("header");

                CellRangeTemplate sample1;
                IEnumerable<List<object>> sample = null;
                switch (template)
                {
                    case OperationTemplates.FIND_DLL_BY_PROJECT_TEMPLATE:
                        sample1 = helper.CreateCellRangeTemplate("sample1", new List<string> { "dll", "branch", "version" });
                        sample = getSample(data, 3);
                        break;
                    case OperationTemplates.FIND_DLL_BY_NAME_TEMPLATE:
                        sample1 = helper.CreateCellRangeTemplate("sample1", new List<string> { "project", "projectBranch", "dllBranch", "version"});
                        sample = getSample(data, 4);
                        break;
                    case OperationTemplates.FIND_DLL_BY_SOLUTION_TEMPLATE:
                        sample1 = helper.CreateCellRangeTemplate("sample1", new List<string> { "project", "dllName", "dllBranch", "version" });
                        sample = getSample(data, 4);
                        break;
                    case OperationTemplates.FIND_SERVICE_REFERENCES_BY_NAME_TEMPLATE:
                        sample1 = helper.CreateCellRangeTemplate("sample1", new List<string> { "solution", "branch", "url" });
                        sample = getSample(data, 3);
                        break;
                    case OperationTemplates.FIND_SERVICE_REFERENCES_BY_SOLUTION_TEMPLATE:
                        sample1 = helper.CreateCellRangeTemplate("sample1", new List<string> { "serviceName", "url" });
                        sample = getSample(data, 2);
                        break;
                    default:
                        return;
                }

                helper.InsertRange(sample1, sample);
                helper.DeleteSheet("Sheet3");
            }
        }
 private string GetTemplate(OperationTemplates template)
 {
     switch (template)
     {
         case OperationTemplates.FIND_DLL_BY_PROJECT_TEMPLATE:
             return @"Templates\findDllByProjectTemplate.xlsx";
         case OperationTemplates.FIND_DLL_BY_NAME_TEMPLATE:
             return @"Templates\findDllByNameTemplate.xlsx";
         case OperationTemplates.FIND_DLL_BY_SOLUTION_TEMPLATE:
             return @"Templates\findDllBySolutionTemplate.xlsx";
         case OperationTemplates.FIND_SERVICE_REFERENCES_BY_NAME_TEMPLATE:
             return @"Templates\FindServiceReferencesByNameTemplate.xlsx";
         case OperationTemplates.FIND_SERVICE_REFERENCES_BY_SOLUTION_TEMPLATE:
             return @"Templates\FindServiceReferencesBySolutionTemplate.xlsx";
         default:
             return string.Empty;
     }
 }