How to create Userdefined Function.Please write the steps
ans also provide example where exatcly we use it.



How to create Userdefined Function.Please write the steps ans also provide example where exatcly w..

Answer / chandu

Hi,
u can create user defined functions in notepad by saving
the file with .vbs extention.
eg:
public function add
x= 20
y= 30
z= x+y
msgbox z
end function
paste the above code in notepad and save it as .vbs ext.
then go to QTP file>settings>resources tab
add the .vbs file there. and then write-- call add---in ur
QTp editor.the use of this is u can reuse the same function
wherever u want. so u can call it multiple times in ur
test.

Is This Answer Correct ?    5 Yes 0 No

Post New Answer

More QTP Interview Questions

Explain the check points in QTP?

22 Answers   Gray Matrix, IBM, Microsoft, Prapan Solutions, Zensar,


if mandatory and Assitive propertys are shows same how will u write skript in QTP window

0 Answers   Wipro,


how can you do retesting (datadriven test) using notepad amd by using functions NOTE u should not use datatable methods

0 Answers  


HOW to invoke any recorded script in QTP with out using RECORD & PLAYBACK CONCEPT?

3 Answers   CTS,


If a button named "CLICK" is recorded in low level recording mode , what will be the values stored for "name" property of that button in object repository ?

0 Answers   Ordain Solutions,






Action1: I have a value "test" stored in a variable X. I want to use that variable X in Action2 .. how?

1 Answers  


What is the concept of hooking in QTP?

1 Answers  


How to track the execution time?

2 Answers  


what is meant by Utility object and utility functions?can u all pls explain these clearly.

1 Answers  


for example one window is there, the window contains how many edit box's i want script? i know the script but that is not exact answer.... The script is like this .......... set a=description.creation() a("Native class")="WinEdit" b=window("Flight Reservation").childobject(a).count msgbox b if u found exact answer please getback to me? raju.ippali@gmail.com 9823257761

1 Answers  


What is test object?

0 Answers  


Is there any vbscript in QTP for Data Driven Test instead of using the option provided by QTP?

2 Answers  


Categories