How can I check if a environment variable exist or not?



How can I check if a environment variable exist or not?..

Answer / Jitendra Tiwari

In QTP, you can use VBScript's built-in function IsObject() to check if an environment variable exists. Here's an example: `Dim envVar as Variant Set envVar = Description.Environment("YourVariableName") If IsObject(envVar) Then 'The variable exists else 'The variable does not exist end if`

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More QTP Interview Questions

how do you find the number of occurences of string QTP from the expression , " QTP+QTP=2QTP"

5 Answers   IBM,


what is the Vbscript to connect Database

5 Answers   IBM,


what are the functions availabla in QTP? what are the data types in QTP?

2 Answers   Spry Technologies,


What are the different ways to invoke an application using QTP?

1 Answers  


what is diff b/w function and action?

8 Answers   VSoft,


how to get childobject from .net application. i tried but its showing child object count zero. but window has child objects.the following script i written... pls help me how to get. set parent=SwfWindow("winodw name") CheckObjectDescription parent, SwfButton Public Function CheckObjectDescription(parent, oDesc) Set oDesc = Description.Create() oDesc("micClass:").Value ="Swfbutton" Set children = parent.ChildObjects(oDesc) cntObj=children.count msgbox(cntObj) End function

1 Answers  


what is main difference between QTP 8.2 AND QTP 9.0/9.2 HOME PAGE?i mean what are extra thing in QTP 9.0 than in QTP 8.2?

1 Answers   Infosys,


Tell me Three major differences between QTP & Winrunner?

5 Answers  


How can we redirect QTP results in to a excel sheet after the execution

3 Answers   SAP Labs, Virtusa,


I Scheduled a QTP Script on remote desktop. Script is going to failure,when remote desktop connection fails.I have to open my remote desktop untile the scripts exection completes. If I disconnect my remote desktop connection, script is going to fail.?

1 Answers   TCS,


what is defenetion of kiran can u tell me plz CVS, SVN

1 Answers  


waht is puirpose of accesbility Check point? waht is the use of Page and XML check points?

1 Answers  


Categories