How to attach screenshots to run result viewer PDF?

Below is my code that I'm using to capture screenshot and display in report but I'm unable to see any screenshots. I want to display screenshots of each pass row from datatable in my PDF (run results viewer).

Dim ScreenName
  On Error Resume Next
  ScreenName = ""
  CurrentTime = "_Test_Case"&"_"& Day(Now)&"_"& Month(Now)&"_"& Year(Now)&"_"& Hour(Now)&"_"& Minute(Now)&"_"& Second(Now)
  'Set the screen shot name
  ScreenShotName = "DC" &  CurrentTime & ".png"
  'Final screenshot location17
  ScreenName ="E:\UFT_Results\SS\DC"&"\"&ScreenShotName
  ' just capture
  Desktop.CaptureBitmap ScreenName,True  

Public Function ScreenCapture()
Dim vNow, vFile
vNow = Replace(Replace(Replace(now(),":","_"),"/","_")," ","_")
vfile ="\\Cd102162\SOS_Optus\ "&vNow&".png"
'Capture Browser Scrren shot
'Window.Maximize

Browser("DC").Page("DC NewLayout").CaptureBitmap vFile, True
' Add the Captured Screen shot to the Results file
Reporter.ReportEvent micPass,"Screen Shot","&lt;<img src='" &vFile& "'>&gt;"
End Function 

Tags:

Parents Reply Children