what is diff b/w function and action?

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 ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

I am Facing Issues with learing datepicker 1)when i first learn datepicker as current system date . 2)if i wanna runtime datepicker value it gives error

2440


How is a Step generator used in UFT?

756


What is the new version of qtp which is recently released in the market?

722


How to use output values in qtp ?

641


what are the challenges you have faced while testing web based application using the automation tools ?

689






How you debug your script?

650


How does qtp recognize objects in aut?

680


can any body clearly explain about keyword driven framework .give me the explanation for files what ever you use in this frame work?

1787


hi guys we r working in office...we write some scripts..suddenly we have a work(5min only) in out side..what will do now,,,used to system shut down or log off or lock or sleep mode,switch use or hibernate?

1680


What VBScript operators, functions, and statements do you use in QuickTest Professional?

2250


Is it possible to change the property value at runtime? How it is possible?

653


How do you delete unwanted results in qtp?

710


Hi Every body please explain me in steps to use checkpoints and object Repositories in QTP for Flight Reservation application please tell me the steps for this its urgent pls thanx for urs answers

1667


In qtp, how you can remove the spaces from string?

639


For which type of project the iterative model is suitable?

1454