private void ReplaceReturnValueReportTemplate(ref string ActionData, ActionReport action) { StringBuilder ReturnValueReport = new StringBuilder(); string ReturnValueReportTemplate = GetStringBetween(ActionData, "<!--ReturnValueReportStart-->", "<!--ReturnValueReportEnd-->"); if (string.IsNullOrEmpty(ReturnValueReportTemplate)) { return; } for (int i = 0; i < action.ReturnValueReport.Count; i++) { string ReturnValueData = ReturnValueReportTemplate.Replace("ReturnValueReport[i]", "ReturnValueReport[" + i + "]"); ReturnValueReport.Append(ReturnValueData); } ActionData = ActionData.Replace("<!--ReturnValueReportStart-->" + ReturnValueReportTemplate + "<!--ReturnValueReportEnd-->", ReturnValueReport.ToString()); }
private void ReplaceScreenshotsTemplate(ref string ActionData, ActionReport action) { string ScreenshotsData = ""; string ScreenshotTemplate = GetStringBetween(ActionData, "<!--Screenshots Start-->", "<!--Screenshots End-->"); if (string.IsNullOrEmpty(ScreenshotTemplate)) { return; } for (int i = 0; i < action.ScreenShots.Count; i++) { string ScreenshotData = ScreenshotTemplate.Replace("ScreenShots[i]", "ScreenShots[" + i + "]"); ScreenshotsData += ScreenshotData; } ActionData = ActionData.Replace("<!--Screenshots Start-->" + ScreenshotTemplate + "<!--Screenshots End-->", ScreenshotsData); }