I have a scenario where i am reading a value from application. I have to use this value in many subsequent actions. So i have two ways to do it
a) Create an output parameter in Action1 and create Input parameter in all other subsequent Actions.
b) Create an Environment variable and use it.
I am inclined to use the Environment variable, but still want opinions on what is a better approach and why?
Re: Environment variable Vs Input/Output parameters
Don't forget you can also use the GlobalDictionary object to store global variables for reuse throughout your test.
I know some developers abhor the use of globals, and I try to avoid them myself, but occasionally you have no choice.
Remember, though, that 'External' user-defined environment variables are treated as Constants so if you want to modify their value you have to make them 'Internal' by defining them in the dialog rather than loading from an xml file.
If you had to identify, in one word, the reason
why the human race has not achieved, and never
will achieve, its full potential that word would be "meetings".