Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
how to export test results into html file
#1
Solved: 11 Years, 3 Months, 4 Weeks ago
Hi all,
i want to know how to export the test scripts results into the html file,
In automation frame work

i have created, main folder - QTPFW

in that i have subfolder -Testscrpts, SOR,Library and Results folders

Result folder contains excel file - which holds just the test name and result -pass or fail thats it, but i want to know how to embed the html result file into qtp.



Thanks in advance
Reply
#2
Solved: 11 Years, 3 Months, 4 Weeks ago
Maybe this would help:
(the xml file is the results.xml. the xsl file is the PShort.xsl in the Run Results Viewer folder)

Code:
Set fso = CreateObject("Scripting.FileSystemObject")
Set xml = CreateObject ("Microsoft.XMLDOM")
xml.async = false
xml.load(xmlfile)

Set xsl = CreateObject("Microsoft.XMLDOM")
xsl.async = false
xsl.load(xslFile)

S = xml.transformNode(xsl.documentElement)

Set CreateFile = fso.CreateTextFile(htmlfile)

CreateFile.WriteLine(S)
CreateFile.Close
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  How to export the output value of a webedit object to a new excel file. mounika6677 1 1,529 04-14-2019, 05:18 PM
Last Post: mounika6677
  Customized HTML reports in QTP azeem 11 49,490 12-31-2016, 02:57 PM
Last Post: chevronneraji
  [UFT] Get text into DIV through HTML tag robertosalemi 2 5,533 03-29-2016, 09:43 PM
Last Post: robertosalemi
  How to Export run result viewer with CAPTURED DATA and save it in PDF,or Doc,or HTML akhandesh 0 2,955 07-16-2015, 06:03 PM
Last Post: akhandesh
  How to attach HTML file to Email Naresh 0 3,069 04-06-2015, 02:04 PM
Last Post: Naresh

Forum Jump:


Users browsing this thread: 2 Guest(s)