Sponsored Ad

Wednesday, October 20, 2010

How to Check a Variable is Array in QTP

Steps to Write a Script:

1. IsArray is used to check a variable is array or not.

2. IsArray return corresponding Boolean values.

Check a Variable is Array using VBScript

<html>
<body>
<script type="text/vbscript">

dim Webs(1)
Webs(0) = "IndiHub.com"
Webs(1) = "BharatClick.com"
dim Sites
Sites = "SharepointBank.com"

Msgbox "Webs IsArray? " & IsArray(Webs)
Msgbox "Sites IsArray? " & IsArray(Sites )

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

Output of above program:

How to Check a Variable is Array in QTP

How to Check a Variable is Array in QTP

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