The online community for software testing & quality assurance professionals
 
 
Calendar   Today's Topics
Sponsors:
Lost Password?

Home
BetaSoft
Blogs
Jobs
Training
News
Links
Downloads



Testing Tools >> HP Functional Testing / Mercury QuickTest Pro / QTP

Pages: 1
abrakh
Junior Member


Reged: 10/17/05
Posts: 352
Customise color of details in Reporter.reportevent
      #581732 - 07/23/09 06:09 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
testking123
Advanced Member


Reged: 05/16/08
Posts: 660
Re: Customise color of details in Reporter.reportevent [Re: abrakh]
      #581740 - 07/23/09 06:26 AM

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Q.A. Tom
Advanced Member


Reged: 07/08/03
Posts: 457
Loc: Germany
Re: Customise color of details in Reporter.reportevent [Re: abrakh]
      #581755 - 07/23/09 06:51 AM


Code:
  
Reporter.ReportEvent micDone, "colored", "&lt;<span style='color:green'>green </span><span style='color:red'>red</span>;"



Post Extras: Print Post   Remind Me!   Notify Moderator  
abrakh
Junior Member


Reged: 10/17/05
Posts: 352
Re: Customise color of details in Reporter.reporte [Re: Q.A. Tom]
      #581775 - 07/23/09 07:26 AM

Thanks Q.A.Tom

I am getting < symbol before green
how to get rid that?

Reporter.ReportEvent micDone, "colored", "&lt;<span style='color:green'>green </span><span style='color:red'>red</span>"


Post Extras: Print Post   Remind Me!   Notify Moderator  
Q.A. Tom
Advanced Member


Reged: 07/08/03
Posts: 457
Loc: Germany
Re: Customise color of details in Reporter.reporte [Re: abrakh]
      #581783 - 07/23/09 07:43 AM

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! :-)

Post Extras: Print Post   Remind Me!   Notify Moderator  
JustHuman
Advanced Member


Reged: 04/06/05
Posts: 520
Loc: Maryland
Re: Customise color of details in Reporter.reporte [Re: Q.A. Tom]
      #581792 - 07/23/09 08:02 AM

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 = "&lt;<IFRAME width=""100%"" height=250 src=""file:///" & sFile & """></IFRAME>&gt;"

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


Post Extras: Print Post   Remind Me!   Notify Moderator  
Pages: 1



Extra information
0 registered and 96 anonymous users are browsing this forum.

Moderator:  IanFraser, Rajkumar_Rajangam, thorwath, TReddy, AJ, Tarun Lalwani, mwsrosso 

Print Topic

Forum Permissions
      You cannot start new topics
      You cannot reply to topics
      HTML is disabled
      UBBCode is enabled

Rating:
Topic views: 995

Rate this topic

Jump to

Contact Us | Privacy statement SQAForums

Powered by UBB.threads™ 6.5.5