Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Global variables in QTP
#1
Not Solved
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.

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..
Reply


Messages In This Thread
Global variables in QTP - by nidhishnair - 05-05-2011, 04:28 PM
RE: Global variables in QTP - by supputuri - 05-05-2011, 09:25 PM
RE: Global variables in QTP - by rajpes - 07-18-2011, 10:25 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Reading Global Sheet's DataTable Value Bhuvana 0 1,675 01-05-2020, 10:03 PM
Last Post: Bhuvana
  Error as Global Not defined while trying to retrieve value from Datatable siddharth1609 0 986 09-11-2019, 02:52 PM
Last Post: siddharth1609
  On Saving Script in QTP 11 my Global Data Sheet data is removed M Adnan Iftikhar 0 2,197 06-02-2015, 09:19 PM
Last Post: M Adnan Iftikhar
  global object which can be called in any action excellentpawan123 2 2,822 04-01-2015, 07:34 PM
Last Post: babu123
  Sometimes there is Global datasheet. utestqa 0 2,740 10-02-2013, 07:09 PM
Last Post: utestqa

Forum Jump:


Users browsing this thread: 3 Guest(s)