JackSparrow
9 years agoFrequent Contributor
Function[Python] For creating an HTML Report
Am also looking for this type of HTML reporting actually i need some more help since am new to everything, after checking the code which i found in our Community itself i.e https://community.smartbear.com/t5/TestComplete-General-Discussions/Creating-html-reports/m-p/129285#M23885]
Sub PageHeader(resfile) Call aqFile.WriteToTextFile(resfile, "<html>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "<head>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "<title> Automation Results </title>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "</head>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "<body>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "<table width=90% border=2 bordercolor=" & "#000000 id=table1 bordercolorlight=" & "#000000>", aqFile.ctUnicode) End Sub Sub AddHtml_Results(resfile,Value) Call aqFile.WriteToTextFile(resfile, "<tr>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "<td width=80% bgcolor = #000000 >", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, value, aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "</td>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "</tr>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "</table>", aqFile.ctUnicode) End Sub Sub PageFooter(resFile) Call aqFile.WriteToTextFile(resfile, "</body>", aqFile.ctUnicode) Call aqFile.WriteToTextFile(resfile, "</html>", aqFile.ctUnicode) End Sub
Actually what exactly we need to give in the test case for the values resFile and Value , can you please let me know