05-05-2011, 04:28 PM
Hi,
I would like to know how to declare and call the global variables in QTP, so that value from one action can be used in another.
I did a little bit of digging and came to know about environment variables. This is what i gave in one action whose value (my_no) had to be exported to the other action.
and in the other action i gave this:-
Shld it not ideally display? Please tell me what went wrong..
I would like to know how to declare and call the global variables in QTP, so that value from one action can be used in another.
I did a little bit of digging and came to know about environment variables. This is what i gave in one action whose value (my_no) had to be exported to the other action.
Code:
dim MyValue
Environment.Value("MyVariable")=my_no
MyValue=Environment.Value("MyVariable")
and in the other action i gave this:-
Code:
Dim no
no=Environment.Value("MyVariable")
msgbox(no)
Shld it not ideally display? Please tell me what went wrong..