Creating Functions to Call
Where can I get information on how to write functions to call in a test script. I was on the phone with Mercury support and he took me through some steps but I haven't a clue on how I could possibliy do it without their help. Thanks.
Re: Creating Functions to Call
When you know how to write functions in VBScript, you can put these functions into a text file and save this file with the extention .vbs
Save it somewhere where you will remember the file, most easy I think is to put it in a directory called VBScripts in the directory where you save all your test scripts.
Then when you need a function, what is in this vbs file, in one of your scripts, you need to link that vbs file with your test script.
To do this, click, when your test script is open, in menu "Test" on "Settings". In the windows that opens, choose tab "Resources" and add your vbs file in the list of "Associated Library Files"
Now you just can call any function what you created in your function library file (the vbs file), from your test script.
More information about writing functions you can find in the help files of QTP.... Start --> Programs --> Quick Test professional --> Documentation --> Books online.
There search for "functions" and "User-defined functions".