abrakh
Junior Member
Reged: 10/17/05
Posts: 352
|
|
Hi All,
Is there a way to customise the color of the font in the Reporter.reportevent ?
Eg: reporter.ReportEvent micPass, "Can I change this font color", "This is green and this is Red"
in the above case the 'green' word should appear in green color and 'Red' word in red color. in the report
Any help.
MAny Thanks
|
testking123
Advanced Member
Reged: 05/16/08
Posts: 660
|
|
Hai friend,
I don't whether there is an option to change the color directly but what I will do is I will convert the xml into HTML. While converting the file into HTMl you will have the you can see the css file named PResults.css. There apply the below color refresh and check the html report again the specified color will be applied.
.Passed { COLOR:#00cc00; FONT-FAMILY: Mic Shell Dlg; FONT-SIZE: 10pt; FONT-WEIGHT: bold }
.Failed { COLOR:#ff0000; FONT-FAMILY: Mic Shell Dlg; FONT-SIZE: 10pt; FONT-WEIGHT: bold }
Thanks
-------------------- The issue what you have listed does not exist, works fine in my machine- stupid comment from the developer
|
Q.A. Tom
Advanced Member
Reged: 07/08/03
Posts: 457
Loc: Germany
|
|
Code:
Reporter.ReportEvent micDone, "colored", "<<span style='color:green'>green </span><span style='color:red'>red</span>;"
|
abrakh
Junior Member
Reged: 10/17/05
Posts: 352
|
|
Thanks Q.A.Tom
I am getting < symbol before green how to get rid that?
Reporter.ReportEvent micDone, "colored", "<<span style='color:green'>green </span><span style='color:red'>red</span>"
|
Q.A. Tom
Advanced Member
Reged: 07/08/03
Posts: 457
Loc: Germany
|
|
I don't know. If you remove it then it print the html code rather than the colored text. If you find a solution for that please post! :-)
|
JustHuman
Advanced Member
Reged: 04/06/05
Posts: 520
Loc: Maryland
|
|
This should help you. just make sure that the path of the html is accable to all that want to read it. Code:
sFile = Reporter.ReportPath & "\ClearSerachField.html" Set FSO = CreateObject("Scripting.fileSystemObject") Set file = FSO.CreateTextFile(sFile, True)
file.Write "<I><B> Object Custom DP Info (For Infromation and Debugging purposes</B></I>" file.Write "<P><B>oWindow := </B> oWindow(regexpwndtitle)<B> Set too :</B>.Message.* <B> Method :</B>(Regular Expression) " file.Write "<P><B>oDialog := </B> oDialog(regexpwndtitle)<B> Set too :</B>Select.* <B> Method :</B> (Regular Expression) " file.Write "<P><B>oWinObject := </B> oWinObject(attached text)<B> Set too :</B> &Search: <B> Method :</B> (Regular Expression) " sHTML = "<<IFRAME width=""100%"" height=250 src=""file:///" & sFile & """></IFRAME>>"
Reporter.ReportEvent micInfo, "ClearSerachField Function", "could not locate the Serach Field to clear see Info" Reporter.ReportEvent micInfo, "ClearSerachField Function info", sHTML
'Clean Up Set file = Nothing Set FSO = Nothing End If
-------------------- Alfredo R. Rivera
IT Principal SDLC Automation Subject Matter Expert
(CCRC/CQ/CQTM/RMT/RFT/RPT/REQPRO)
(LR/QTP/CQ/SS/WR)
Certified Mercury Interactive Instructor
Certified Tester, Foundation Level (CTFL)
www.fredotech.com
www.testingframework.com
www.automationtesting.org
http://www.linkedin.com/in/fredotech
|