How can I include a variable in my user-defined log message

Ask general questions here.
User avatar
Aracknid
Posts: 365
Joined: Tue Aug 10, 2010 3:23 pm
Location: Toronto, Ontario, Canada

How can I include a variable in my user-defined log message

Post by Aracknid » Wed Jun 05, 2019 2:22 pm

Hi,

In my recording module I call a piece of user code that returns a string to a variable. In the module I want to log to the report the variable along with a message. I can pick the variable from the drop down (where you can type the message) or I can type a message, but how do I combine them? I tried: 'The returned value was $value' and it didn't work.

See the section "user-defined log messages" here: https://www.ranorex.com/help/latest/ran ... tics-data/

In the screen shot, the message "Validation finished!" is logged. If you click here you can also pick variables (if you have any) from a drop down. How to combine them?

Aracknid

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

Re: How can I include a variable in my user-defined log message

Post by odklizec » Wed Jun 05, 2019 2:40 pm

Hi,

I'm afraid, that's not currently possible. You will have to convert the report log action to user code and combine the log message with variable in user code. A similar thing has been discussed here:
https://uservoice.ranorex.com/forums/15 ... on-match-v
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