what are the environment variables,how do you use them.
give an example.
Answers were Sorted based on User's Feedback
Answer / deepa
Environment Variables are variable whose value is fixed for
its usage everywhere.
There are two types.
1.Built in-which are already existing in QTP which we can
directly use in out script.
ex:ActionName,ActionIteration
2.User-defined
which user has to define and use those variables anywhere
in the action.
Ex:File path-Suppose u r reffering a data file in ur script
then store the location of ur file path in environment
variable and use it across the actions.
| Is This Answer Correct ? | 3 Yes | 1 No |
Answer / chakrapani
Built in Enironment
a=Environment.Value("TestName")
msgbox a (this gives test script name )
if u see in qtp Resources Environment built in u find many
things like TestName, Pathdir,version etc
User defined Evironment
i want to store a value in run time and pass to another
script then
a=Enironment.Value("DocumentNumber")
| Is This Answer Correct ? | 0 Yes | 0 No |
we add library file used in test via settings or through "ExecuteFile" command. when we implement framework do we make common library file and load the same for all the test cases execution?
In the Hybrid framework, data can access the database, excel file, XML etc. Is it true?
How to handle "Java Runtime error" popup window in the web application ? Sometimes the application throws the error repeatedly... Is there any browser setting available to disable the error ?
What does ".mst" stands for? (abc.mst)
How open an excel sheet in QTP(not a run time )?
What are the versions of qtp,What are the differences b/n them?
what is the difference between IE & Netscape in web testing on a log in page
How do you learn the object in QTP?
We developed 100 descriptive programms and put in running, in the midle if any descriptive program is stucked with some error? what will happend weather it will execute the remaining prg's or it will terriminate ?
Why is Client side image is preferred over server side image?
What is the use of Regular expression?
How to data driven test for Win objects in QTP ?