Is there a way to access the values of the global variable in my case an array which gets value stored during the run time .
To be specific consider there are 2 scripts unit1 and unit2 in unit1 I have declared an array say company(5) during run time the company array gets it value from a procedure in unit1 script. Can I access these values in procedures of script unit2
Depending upon your script language the actual command may differ. but, for JScript, you can use
at the beginning of your unit 2. You can then call the variable as unit1.company.
Robert Martin [Hall of Fame] Please consider giving a Kudo if I write good stuff ----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group. I love good food, good books, good friends, and good fun.
You could also try using the project and project suite variables. The variables and data will persist between test runs but you can always write a helper function to delete them when you are done. I use the project suite variables in my test runs for sharing data between scripts and it works great. In some cases I want the variables to persist between test runs and in some I only need them to be temporary. For the latter case I have a script that deletes them at the end of a test run.