Forum Discussion

gopalmalu's avatar
gopalmalu
Contributor
14 years ago

How to declare Global variable in TestComplete

HI,



We want to use global variable which can be accessible throughtout the function (test).

How can we do this in testcomplete?



Thanks,

Gopal

3 Replies

  • Hello,



    Are non-project global variables visible across different scripts?



    I've created a global scope variable in one script,



    Dim testVar : testVar = "test"



    However, the following sub in another script does not see the variable:



    Sub CheckVar

    Log.Message testVar

    End Sub



    I've set up the project in such a way, that it runs CheckVar at start.