Can any one explain about environment variables with examples?

Answers were Sorted based on User's Feedback



Can any one explain about environment variables with examples?..

Answer / pravati

environment variable is a variable which keeps the value through out action
environment variable are of two types
1.built in
2.userdefined
In built in-u can retrive the built in data
ex-msgbox environment.value("os")
In userdefined u can set the value in environment
ex-file>>setting>>envrnment>>userdefined(+)>>value(abc.01@gmail.com),name(username)
then retrive the data of value & name in test

Is This Answer Correct ?    0 Yes 0 No

Can any one explain about environment variables with examples?..

Answer / prathyusha

Environment Variables are used to get the basic information of system .
we do have two types
1.inbuilt environment variables
2.user-defined environment variables

Inbuilt environment variables used to get the basic information of system like test name,action name,user name,os
Eg: Environment.value("User Name")

User defined environment variables
two types
a.Internal environment variables
b.external environment variables

Internal Environment Variables are used to pass the values form one action to another action.
External environment Variables are used to store the master credentials of application.For this we can use Xml files to store the information and we can associate these files to the test and we can read the value using Environment.value("some variable").

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

How can i see test results in excel sheet ? test data not present in data table.

5 Answers  


How does Parameterization and Data-Driving relate to each other in QTP?

2 Answers  


Hello everyone, I am trying to parametrize a script. Its clear to me that, we use data table to enter various text data. but if I want to change the radiobutton (e.g. if for first iteration I selected radio button 'A' and for second iteration I want to use 'B' radio button for second iteration) then how can I make it happen. I have tried to define the question but still if not clear plz tell me. Thanks everyone

1 Answers  


What is text/text area checkpoint?

0 Answers  


Diff b/w test scenario's and test Procedures?

0 Answers  






what is stepin & stepout?

0 Answers  


we are submitting data one form to another form.defaultly it is time period set as 5sec. but it is taken 15sec what to do

5 Answers   Covansys,


why we use sendkey method in qtp?

2 Answers   ABC,


In an(AUT) web application their are two frames as fraMain and fraFooter. Both the frames contain link which needs to be retrieved at a single step. I tried it using "Regular Expression" as fra.* but QTP doesn't recognize the object. So Plz help me out to get resolve the problem:-)

1 Answers  


I have to automate webpage. If I click one hyperlink2 it will take 2 hrs to open. How to automate hyperlink2?

4 Answers   Cap Gemini, Polaris,


What is action? How many types of actions are there in qtp?

0 Answers  


How to customize qtp?

0 Answers  


Categories