/// <summary> /// Adds a snapshot to the log event details using a Base64 string /// </summary> /// /// <param name="Base64String">Base64 image string</param> /// <returns>A formed HTML img tag</returns> public string AddBase64ScreenCapture(string Base64String) { string screenCaptureHtml = ScreenCaptureHtml.getBase64Source(Base64String); var img = new ScreenCapture(); img.Source = screenCaptureHtml; img.TestName = _test.Name; img.TestID = _test.ID; _test.ScreenCapture.Add(img); return(screenCaptureHtml); }
/// <summary> /// Adds a snapshot to the log event details /// /// Note: this method does not attach the screen-cast to the report, it only /// links to the path /// </summary> /// /// <param name="ImagePath">Path of the image</param> /// <returns>A formed HTML img tag with the supplied path</returns> public string AddScreenCapture(string ImagePath) { string screenCaptureHtml; if (IsPathRelative(ImagePath)) { screenCaptureHtml = ScreenCaptureHtml.GetSource(ImagePath).Replace("file:///", ""); } else { screenCaptureHtml = ScreenCaptureHtml.GetSource(ImagePath); } var img = new ScreenCapture(); img.Source = screenCaptureHtml; img.TestName = _test.Name; img.TestID = _test.ID; _test.ScreenCapture.Add(img); return(screenCaptureHtml); }