Interview Questions   Tutorials   Discussions   Programs   Videos   

QTP - How to create user defined functions in QTP?

asked marvit August 19, 2014 05:26 AM  

How to create user defined functions in QTP?


1 Answers

answered By Dharma   0  
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
-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

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

   add comment

Your answer

Join with account you already have



Ready to start your tutorial with us? That's great! Send us an email and we will get back to you as soon as possible!