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:
Output of myType=44
Output of myType=false
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