What is the difference between functions and actions in

QTP?

Answer Posted / deven

♦It returns single value.
♦ we can call functions within actions but we can't call
actions within functions

♦ Generally functions are saved with ".vbs" extension
whereas actions will save with ".mts".

♦ Every Action will have its own Datatable whereas function
does not.

♦ Action can have a object repository associated with it
while a function can't. A function is just lines of code
with
some/none parameters and a single return value while an
action can have more than one output parameters.

♦ Action can contain Object Repository, Data table, Active
screen etc. whereas function do not have these features.

♦ Action is internal to QTP whereas Function is just lines
of code with some/none parameters and a single return value.

♦ Action can/cannot be resuable whereas functions are
always reusable.

♦ Action Parameter have default values whereas VB script
functions do not have any default values.

♦ Action parameter type are byvalue only where vbscript
functions can be passed byref.

♦ Action can have multiple output(returning) values whereas
function can return only single value.

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How can we extract data like "Details","Result","Time" from the 'Run Error' result generated in QTP after run time errors are generated during a run & import the details etc...into excel sheet

1775


What is quick test pro?

814


What are the views available in quicktest professional?

757


Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com

1593


what is clean sweep?

2056


How to execute a winrunner script in quicktest professional?

750


Can any suggest me what is exposure testing?

1558


Is it possible to call from one action to another action in qtp?

777


What is an expert view and keyword view?

795


What is ‘object spy’ and what is the function of object spy in qtp?

750


How to change the priorities of the recovery scenario properties?

822


tell me exact differenceb bw qtp and selenium?(could not tell open soure and licennce? difference in usage and technical difference?

1820


Can anyone pls tell me in realtime (descriptive programming) how will the properties of the object be given to the test team. R they given in an excel sheet and is the same sheet also given to the development team and by whom is this given? Thanks a lot.

1767


In qtp, how you can get the last character from a string?

744


hai, i completed my b.tech in 2010 with 62.3%. i having knowledge on manual testing and Qtp. i want Relavent experience in testing.watever may be d salary i dont bother..I just want to gain knowledge. i dont have good communication skills.

1614