Sponsored Ad

Monday, November 1, 2010

QTP TypeName: Get Subtype of a Variable

Steps to Find QTP Variable Name:

1.  TypeName is used to find the variable name in QTP.

2. The following types are available in VBScript:

Byte , Integer, Long , Single , Double , Currency , Decimal , Date , String , Boolean , Null , Empty , <object type> , Object , Nothing , Unknown , Error

QTP VBScript Program to find the variable type name: 

<html>
<body>

<script type="text/vbscript">

myType="www.TestingWiz.com"
msgbox TypeName(myType)
myType=44
msgbox  TypeName(myType)
myType=false
msgbox  TypeName(myType)

</script>
</body>
</html>

Output of myType=www.TestingWiz.com:

QTP TypeName: Get Subtype of a Variable

Output of myType=44

QTP TypeName: Get Subtype of a Variable

Output of myType=false

QTP TypeName: Get Subtype of a Variable

Where to Run This Program:

1. This VBScript Program code either you can use in QTP editor  (code between <script> and </script> tags ) and run it.

2. Write in Notepad, save with .htm extension and run on internet explorer.

0 comments:

Post a Comment

Sponsored Ad

Development Updates

Tech Updates