Forum Discussion

ory_z's avatar
ory_z
Contributor
15 years ago

Working with Project Suite variables from scripts - limitations

Hi there,



According to the TestComplete documentation (to the best of my understanding) the following cannot be done from scripts:

1. Setting a variable's Default Value

2. Setting a variable's Description

3. Adding a variable and specifying whether it should be temporary or persistant

4. Setting a variable's Category



These limitations are causing us a few issues:

In our projects, we are trying to work with a common library + a project specific library. The common library makes use of some ProjectSuite variables (as good global variables), and therefore wherever we use the common library, we need to add all the ProjectSuite variables used by the common library to the new project. Easiest way to do this is implement a script that simply adds all the variables required (already done).



However due to the limitations mentioned above:

- We cannot add temporary Variables with default values (for example a flag that always initialises as False)

- We canot automatically set variable descriptions making  this a manual cut and paste job



Is there any workaround?



Thanks

13 Replies

  • Hi everybody,

    I was looking to that:



    - ability to add temporary project variables from script;



    so I exprim my interest in increasing this rating !



    Many thanks,

    Christophe
  • HI All,




    I want to read text from Textfile and want to post it as a value to project suite variable. I want this value to be used in decision making in different projects like whether variable value is equal to filetext.


    I am not able to do it by readwhole textfile and open textfile because i am not able to post it to project suite variable. How to store file contents as variable value?