Page 1 of 1

Recording Module requiring Data binding of Repo Variable

Posted: Mon Feb 13, 2012 3:37 pm
by Pixi6s
My repo is using a Variable "Domain" that is referred to by all the repo paths.

When i create a Recording Module it automatically adds the Variable "Domain" and requests it to be bound. This use to be fine because I would set the variable once to a global variable. Now I need the repo variable "Domain" to be flexible and change during the run, so I do not want to bind it to a global variable or data element.

My code module just reads in the "Domain" variable as I set it in the repo, and when i update the value of the repo variable it uses the new value.

Is there anyway around this besides converting my Record Modules to Code Modules?

Thanks
Sierra

Re: Recording Module requiring Data binding of Repo Variable

Posted: Tue Feb 14, 2012 1:29 pm
by Support Team
Hi,

You can also set the value of the specific repo variable via an User Code action within your normal Recording.
Just add a new User Code to your action table and now you are able to set it via code like:
repo.yourRepoVariable = "YourValue";
Regards,
Markus
Ranorex Support Team