Bolding Text in Ranorex Reports

Ranorex Spy, Recorder, and Studio.
Pixi6s
Posts: 92
Joined: Tue Jun 28, 2011 8:57 pm

Bolding Text in Ranorex Reports

Post by Pixi6s » Thu Apr 26, 2012 8:46 pm

Hello,

I was curious if I could bold and possibly change the color of text in the Ranorex log, without just modifying the XML afterward if possible. Is there a parameter I could pass in with the Ranorex.Log call that would add any distinction (besides pass or fail)?

Thanks
Sierra

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Bolding Text in Ranorex Reports

Post by Support Team » Fri Apr 27, 2012 11:44 am

You can use the Report.LogHtml method to log text including HTML tags. Just make sure that plain text you want to log does not contain any forbidden characters like '<' or '>'.

Regards,
Alex
Ranorex Team
.
Image

Pixi6s
Posts: 92
Joined: Tue Jun 28, 2011 8:57 pm

Re: Bolding Text in Ranorex Reports

Post by Pixi6s » Mon May 21, 2012 3:29 pm

Works great! Thanks

Hermch
Posts: 40
Joined: Thu May 26, 2011 7:17 am
Location: Germany

Re: Bolding Text in Ranorex Reports

Post by Hermch » Fri Nov 30, 2012 11:17 am

Hi,

I want just a part of the reported text to be bolded:

Until now I just use Report.Info:

Report.Info("Total number of objects in Table " & ThTag.Item(0).InnerText & ":" & CountObj)

What I would like to have is, that the middle part in the Ranorex Report is depicted as bolded:

Report.Info("Total number of objects in Table " & ThTag.Item(0).InnerText & ":" & CountObj)

How does this work?

Thanks in advance!

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Bolding Text in Ranorex Reports

Post by Support Team » Fri Nov 30, 2012 11:53 am

Hi,

Did you already try what Alex suggested (using the Report.LogHtml)?

Regards,
Markus
.
Image

Hermch
Posts: 40
Joined: Thu May 26, 2011 7:17 am
Location: Germany

Re: Bolding Text in Ranorex Reports

Post by Hermch » Fri Nov 30, 2012 1:02 pm

Yes I tried to use Report.LogHtml but could not get it working.

Could you please give me an example how to use LogHtml?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Bolding Text in Ranorex Reports

Post by Support Team » Fri Nov 30, 2012 1:23 pm

Hi,

Okay, here is a sample code, it shows how it could work for you:
Report.LogHtml(ReportLevel.Info,"User","<p>Total number of objects in Table: <span style='font-weight:bold'>"+yourElement.InnerText.ToString()+"</span></p>");
Regards,
Markus
.
Image