Page 1 of 1

LogHTML to open up Program with parameters

Posted: Wed Sep 05, 2012 9:56 pm
by stevenh
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

Re: LogHTML to open up Program with parameters

Posted: Thu Sep 06, 2012 4:03 pm
by Support Team
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

Re: LogHTML to open up Program with parameters

Posted: Thu Sep 06, 2012 8:52 pm
by stevenh
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

Re: LogHTML to open up Program with parameters

Posted: Mon Sep 10, 2012 10:20 am
by Support Team
Hello Steven,

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

Regards,
Bernhard
Ranorex Support Team

Re: LogHTML to open up Program with parameters

Posted: Mon Sep 10, 2012 2:25 pm
by stevenh
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