This is a migrated thread and some comments may be shown as answers.

Global Variables

1 Answer 220 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
S
Top achievements
Rank 1
S asked on 28 Jun 2011, 05:40 PM
Is there a way to add Global variables to a project.  I had a set of scripts that required using a significant number of code steps - many of which used the same variable.  Data binding a variable to each of these steps is cumbersome - is there a way to include a variable into each of the steps?


Thanks

1 Answer, 1 is accepted

Sort by
0
Plamen
Telerik team
answered on 29 Jun 2011, 03:08 PM
Hi S,

Just use a static variable in a class and use that variable whenever you need in your coded steps. It will work as a global variable. You can also create a static property, so you can change it if needed to. I've attached a simple project for you.

All the best,
Plamen
the Telerik team
Register today for a live 'What's New in Test Studio R1 2011 SP2' event on Tuesday, July 19 at 2pm EST!

Have you looked at the new Online User Guide for Telerik Test Studio?
Tags
General Discussions
Asked by
S
Top achievements
Rank 1
Answers by
Plamen
Telerik team
Share this question
or