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

Hi Friends, Would be great if you can provide the Model Question paper, Web site link or any reference s. Thanks & Regards, Byzoor,

1342


To which environments does quicktest professional (qtp) supports?

584


How will we compare the texts in the two word files using QTP writing the script in Descriptive Programming. Thanks

1543


How QTP identify the system time that's changes every seconds?

590


please give me the code for doing retesting of gmail login page using functions so the function has to give the value

1542






what is Property......End Property loop? how to write sript for it in QTP

1889


how can we test the Triggers, Cursors, Indexes while doing Database testing in DTP??

1581


What are the different attribute used with regular expression?

528


Did QTP prove efficient for your project? Yes or No, explain?

6117


How do you configure QTP AND Test director?

1492


Hi! Using Descriptive Programming How do we get Parent object for an object by writing script(DP). Say, i want to get a parent object for a "Link" in a web page by writing script in Descriptive Programming.

2096


Explain the features and benefits of quick test pro(qtp)?

510


How will you declare a variable in qtp?

548


please post the interview questions for QA position in FACTSET

3942


Hi, Can anyone please tell me how to connect the QC with QTP using QTP script? Thanks in advance

1517