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

What are the things(properties, and other details) will be recorded while recording an object using normal recording?

1487


What is qtpro? What is a quick test professional?

579


What is quick test pro? What is a quick test professional?

547


What is the difference between a Function and Procedure in QTP?

673


What is active screen?

560






What is the file extension of the code file in qtp?

556


I want to grow as a Automation Engineer,Kindly help me in clearing my interview that what interviewer looks for as a Automation Engineer. I am having three years of experience in testing.

1618


what is the difference between built-i function and In-built function?

1627


what QTP Options do you know?

2918


How to use transactions in qtp?

557


Define virtual object?

601


What is action? How many types of actions are there in qtp?

609


In Test Directory, What are the contents in test case designing? if you prepare in excel sheet how u use thrw Test Directory?

1501


Describe the differences between functions and actions in UFT?

602


What is the difference between the design-time and run-time data tables?

552