variable (value) in comment

Ask general questions here.
dman
Posts: 64
Joined: Mon Aug 29, 2011 9:33 am
Location: München

variable (value) in comment

Post by dman » Fri Sep 02, 2011 2:54 pm

is it possible to display a variable's value into a comment (e.g. by some escape characters)?
I'm referring to the comments from the recordings, which are displayed in console when running projects

All the best,
D.

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: variable (value) in comment

Post by Ciege » Fri Sep 02, 2011 9:46 pm

I'm a little confused... Are you asking about (A) displaying variable values in the resulting ranorex report?
Or literally, (B) variable values in the comments in the code?

If A, something like this:

Code: Select all

Report.Info("** My Report Comment: " + MyVariable + ".");
If B, well then... I'm not sure what that would mean... Since you only see comments when modifying the code and/or debugging. In which case you would have a look at the variable for its value.
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

dman
Posts: 64
Joined: Mon Aug 29, 2011 9:33 am
Location: München

Re: variable (value) in comment

Post by dman » Mon Sep 05, 2011 10:01 am

HI Ciege,

and thank you for your reply!

It's (A) - only that is related to the recorder view comments (in the report I'd like to get the value); hence no code.
Please see the screenshot I've attached.

All the best,
D.
variable in comment.jpg
variable in comment.jpg (65.22 KiB) Viewed 692 times

dman
Posts: 64
Joined: Mon Aug 29, 2011 9:33 am
Location: München

Re: variable (value) in comment

Post by dman » Mon Sep 05, 2011 12:12 pm

ha ha... if I convert the recording to user code - I can use your example ;)

User avatar
Ciege
Ranorex Guru
Posts: 1335
Joined: Thu Oct 16, 2008 6:46 pm
Location: Arizona, USA

Re: variable (value) in comment

Post by Ciege » Tue Sep 06, 2011 3:56 pm

dman wrote:ha ha... if I convert the recording to user code - I can use your example ;)
So is that you did and are you all working as expected now?
If this or any response has helped you, please reply to the thread stating that it worked so other people with a similar issue will know how you fixed your issue!

Ciege...

dman
Posts: 64
Joined: Mon Aug 29, 2011 9:33 am
Location: München

Re: variable (value) in comment

Post by dman » Thu Sep 08, 2011 9:37 am

sure it works - once the matter goes to code, anything is possible ;)

thanx man!

D.