how to create user defined functions in QTP? can any one
expalin me with example..
Thanks in Advance for help
Answer Posted / prashanth chenna
Creating User defined Functions:
Open QTP and Application --> type function header along
with Unique function name and arguments --> Record
repatable operations in application as function body -->
follow above navigation to create more then one functions --
> Save that functions in a file using 3rd party s/w with
Extension .vbs( Copy the script, genarated in QTP and paste
in Notepad, MS.Word etc.) --> now goto Resource menu in
QTP --> object Repository --> file menu --> Export Local
Objects --> Enter file name with Extension .tsr --> click
Save.
Calling User defined Functions:
In QTP --> type Useer defined function name along with
argument values --> file menu --> settings --> Resources
tab --> click + icon -->browse the path of the file -->
click apply --> click OK --> Resources menu in QTP -->
Associate Repositories --> Click + icon --> browse the path
of references file --> select current action --> click OK.
Example:( Creating User defined Function )
Public function login(x,y)
Dialog ("Login").winedit("User name").set x
Dialog ("Login").winedit("Password").setsecure
crypt.encrypt (y)
dialog ("Login").winbutton("OK").Click
End Function
( Calling User defined Function in a test )
login "prashanth","testing"
| Is This Answer Correct ? | 15 Yes | 2 No |
Post New Answer View All Answers
How to open a new test using quicktest professional (qtp)?
To which environments does quicktest professional (qtp) supports?
What is the difference between shared and local object repository?
Explain types of descriptive programming?
What is the synchronization point in qtp?
Can we use index on view?
what is run-time data?
How many types of status are there?
UFT 12.02 which ALM version will support
Hi,Sudhanandareddy plz forword framework and ppts for QTP to me. This is my mail id: ranjith_99reddy@yahoo.co.in (your contact number also)
I am trying to install QTP 9.5 but i am getting error message saying that ("Path is \QuickTest Professional\bin\vb_init.exe") vb_init.exe file is not find. can anybody give me the advise what to do ?
Hi any body pls help me for QTP 11.0 software free demo version. i have to practice. Kindly send the link.or where i have to download.
how to download mercury qtp9.2 ny internet ?
What is qtpro? What is quick test pro? What is a quick test professional?
What are the types of data tables in qtp?