Script to Generate Html files from .rxlog

Ask general questions here.
logesh_lkk
Posts: 2
Joined: Mon Mar 14, 2022 2:41 pm

Script to Generate Html files from .rxlog

Post by logesh_lkk » Mon Mar 14, 2022 2:51 pm

Hi All,

I wanted to know if there is a python/c# script that can automatically convert the rxlog file to html format without having to open the Ranorex studio.
would be nice to know that to better automate this part.

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Script to Generate Html files from .rxlog

Post by odklizec » Mon Mar 14, 2022 3:49 pm

Hi,

No, there is no such script available. But you can instruct Ranorex to create HTML file instead of rxlog file. Simply change report extension to HTML. The problem is, that if you want to distribute such report, you will have to collect bunch of files (css, xsl, html, data.html and all images and snapshots) eventually created during test run. In other words, using rxlog and standalone report viewer is much simpler solution.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

logesh_lkk
Posts: 2
Joined: Mon Mar 14, 2022 2:41 pm

Re: Script to Generate Html files from .rxlog

Post by logesh_lkk » Mon Mar 14, 2022 8:03 pm

Thank you
In my case, I need both the html file (with all its other files) and the rxlog file

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 7470
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Script to Generate Html files from .rxlog

Post by odklizec » Tue Mar 15, 2022 8:09 am

Hi,

Well, in this case, your only option is to enable creation of compressed (rxzlog) report, along with uncompressed (rxlog OR HTML) report. You can't have both rxlog and HTML. Eventually, you can extract uncompressed rxlog files from rxzlog (via code). Rxzlog is just zipped rxlog ;)
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

manuelhafner
Posts: 2
Joined: Fri Sep 29, 2017 2:25 pm

Re: Script to Generate Html files from .rxlog

Post by manuelhafner » Wed Aug 10, 2022 5:45 pm

.NET and C#:
Create an object to read files with the extension .rxlog.data with System.Xml.XMlReader.Create(<file_path>). Read the given XML structure.
Transform it to HTML with your CSS formatting and into tables. At the end, write everything into a text file with System.IO.StreamWriter by calling System.IO.File.CreateText() and also System.IO.File.AppendText.

I don't think there is an official application to do the conversion. Unfortunately, everyone has to do it for themselves. But once you have done it, it works.