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

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Is it possible to split an action? How?

870


how to do the batch testing in test director using manual testing procedure?

2033


describe some problems that u had with automating testing tool?

1605


Explain the parameter in qtp?

789


What is the difference between run time object and test object?

806


what are the critical test cases in crm? tell me atleast 5 critical test cases? what are the critical bug u find out while testing crm domain?

2973


wt is the use of multiple questions in QTP

1905


What are the different types of functions available in qtp and explain ?

798


Why qtp always start action1 and does not start action?

849


i have asked earlier only one question how to test web application using QTp plz send me the answer quickly

1899


Hi this is chandra if any one have Navigation of LAB QTP, I want Navigation of those tools, if any one have the and know the Navigation each and every part of the QTP, plz send me my mail naruboinac@yahoo. com,naruboinas@ gmail.com

1710


Hi, I am using OutputCheckPoint and I am storing the value in the data table. The stored value for column:bedroom:"Bed:4" The another value for column:bathroom:"Bath:2 Full,1 Partial" I need only the no 4 from the first column. I need only the no 2,1 from the second column. I used split array,but it also show array(0) has the value"bed:4" ..... Even though I highlight only 4,It is seleting the full value "bed 4".How can I get only the nos Thank you Uma

1521


What is the use of Debug Viewer?

1691


What are benefits of qtp?

816


What do you mean by checkpoints in qtp?

792