LogHTML to open up Program with parameters

Class library usage, coding and language questions.
stevenh
Posts: 11
Joined: Wed Sep 05, 2012 9:51 pm

LogHTML to open up Program with parameters

Post by stevenh » Wed Sep 05, 2012 9:56 pm

Hi, I wanted to put in a link in the Report section that will open up a file compare program comparing two files. I was wondering if this was possible using the LogHTML function in the Report class. To my knowledge, sending parameters are not possible without the use of scripting in which case the hyperlink would be used to call the function in the script with the parameters.

If this is not possible, is there any workaround to it?

Thanks,
Steven

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

Re: LogHTML to open up Program with parameters

Post by Support Team » Thu Sep 06, 2012 4:03 pm

Hello Steven,

As you said, you can use Report.LogHtml to insert a link into the report file to start a program as follows, but the Ranorex report file is not designed for such things.
Report.LogHtml(ReportLevel.Info,"Info","<a href='C:\\Windows\\System32\\calc.exe'>CALC</a>");
What you can do is to start your program within the UserCode.

Regards,
Bernhard
Ranorex Support Team
.
Image

stevenh
Posts: 11
Joined: Wed Sep 05, 2012 9:51 pm

Re: LogHTML to open up Program with parameters

Post by stevenh » Thu Sep 06, 2012 8:52 pm

Hi Bernhard,

Thanks for the reply, but I was wondering about the full capabilities of the LogHtml function. In my case, I wish to be able to send parameters as well as starting the program. Any solution to this?

Steven

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

Re: LogHTML to open up Program with parameters

Post by Support Team » Mon Sep 10, 2012 10:20 am

Hello Steven,

Unfortunately this is not possible. I am afraid you have to do this in the UserCode.

Regards,
Bernhard
Ranorex Support Team
.
Image

stevenh
Posts: 11
Joined: Wed Sep 05, 2012 9:51 pm

Re: LogHTML to open up Program with parameters

Post by stevenh » Mon Sep 10, 2012 2:25 pm

Hi Bernhard,

That is unfortunate, so what I decided to do is create a batch file that would run when the hyperlink is clicked. In this way, I could send parameters to it, although it required extra files to be created.

Regards,
Steven