Highlighted
Absent Member.. Absent Member..
Absent Member..
671 views

Run Results Export as HTML with Hyperlinks to Network stored screenshots

 

I built a function that will capture a screenshot on a failure and write that to the Reporter.  Works great unless you want to export the Run Results to PDF or HTML and send out.  There does not seem to be any way to see any screenshots.

 

I also attempted to write some HTML code and put it into the report event text but it's Replacing the < and > with their HTML values.   &lt; and  &gt;

 

Any idea how I can force this html code to be written as html in the reports?

 

 

Function CaptureCurrentScreen(ProcessName)
FileName = "\\DOMAIN\DRIVE\QAdept\PNG_Files\" & ProcessName & "_" & Year(Now) & "-" & Month(Now) & "-" & Day(Now) & "-" & Hour(Now) & "-" & Minute(Now) & "-" & Second(Now) & ".PNG"
HTMLLink = "<a href=""file:///" & FileName & """> Link is Here </a>"
Window("WindowName").CaptureBitmap FileName
Reporter.ReportEvent micFail, ProcessName, "Screenshot has been stored. " & HTMLLink, FileName
End Function

 

 

P.S. This thread has been moved from Quality Center Support and News Forum to Unified Functional Testing (formerly QTP) News and Support Forum. - Hp Forum Moderator

 

0 Likes
2 Replies
Highlighted
Absent Member.
Absent Member.

Re: Run Results Export as HTML with Hyperlinks to Network stored screenshots

1. Try to use Run Results Viewer Patch (RRV_00019).
Please refer the below link for more details.
http://www.joecolantonio.com/2011/10/19/alert-%E2%80%93-qtp-11-run-results-viewer-patch-rrv_00019-released/

2. Please try below code:
FileName = "C:\Result\" & ProcessName & "_" & Year(Now) & "-" & Month(Now) & "-" & Day(Now) & "-" & Hour(Now) & "-" & Minute(Now) & "-" & Second(Now) & ".PNG"
Desktop.CaptureBitmap FileName
Set oEventDesc = CreateObject("Scripting.Dictionary")
oEventDesc("ViewType") = "Sell.Explorer.2"
oEventDesc("Status") = micPass
oEventDesc("EnableFilter") = False
oEventDesc("NodeName") = "HTML Text"
oEventDesc("StepHtmlInfo") = "<a href=""file:///" & FileName & """> Link is Here </a>"
newEventContext = Reporter.LogEvent ("Replay",oEventDesc,Reporter.GetContext)

0 Likes
Highlighted
Absent Member.. Absent Member..
Absent Member..

Re: Run Results Export as HTML with Hyperlinks to Network stored screenshots

Hello, I'm attaching some files to Run Details and would like to create a link to the files in Run Results Viewer. How do I get URL of the attached files? Any help would be greatly appreciated. Thanks!

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.