Dynamically Setting Variables?

Ranorex Studio, Spy, Recorder, and Driver.
Posts: 5
Joined: Tue Mar 13, 2012 7:32 pm

Dynamically Setting Variables?

Post by chowdhury_a » Tue Mar 13, 2012 7:46 pm


I'd like to set variables based upon attribute values found by my tests. How can this be done?


User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA

Re: Dynamically Setting Variables?

Post by Support Team » Wed Mar 14, 2012 8:30 am


you can simply access the module variables within user code items of your recordings and overwrite them.
If you have e.g. a variable called "$test" in your recording, you can overwrite it by adding a user code item to your recording and adding following line of code to this user code item:
test = "<your value>";
If you'd like to overwrite parameters of your test case please have a look at following forum post which might help you solving your issue:
Global parameters - recordings' variables binding

Support Team