Forum Discussion
JackSparrow
9 years agoFrequent Contributor
And after the Execution the Report is looking like this
anyone can give me guidance on this
and code which i used is
def Reporting(resfile,Value):
aqFile.Create("C:\\work\\myreport.html")
aqFile.WriteToTextFile(resfile, "<html>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "<head>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "<title> Automation Results </title>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "</head>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "<body>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "<table width=90% border=2 bordercolor=" + "#000001 id=table1 bordercolorlight=" + "#000001>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "<tr>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "<td width=80% bgcolor = #000000 >", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, Value, aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "</td>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "</tr>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "</table>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "</body>", aqFile.ctUnicode)
aqFile.WriteToTextFile(resfile, "</html>", aqFile.ctUnicode)
def testcas1():
Reporting("C:\\work\\myreport.html",'Hello Reporting')
baxatob
9 years agoCommunity Hero
Your code works fine :)
This is what I see:
Possibly you need to add a tag to control the color of the font.
P.S. Imho building report like you do - is a very very fragile way. Imagine that sometime you will require more complex grid.