What is the exact difference bet function and action in QTP
Anybody can explain it in detail..Thanks in advance..

Answer Posted / paresh patel

1. Action is a QTP Feature. Function is a VBScript/JScript
Feature.
2. Actions can return multiple outputs. Function can return
only one output.
3. Actions can have only basic data type (String, Number,
Boolean, Date, Password, Any) as input & output parameters.
Where 'Any' is a variable type data. Functions can have
basic Data Types, Object Data Types as well as Array
Variables as Input Arguments and Output value.
4. Function is a code block stored in a Text Type File.
Action is stored as a Folder and has many other entities
like data-table, object-repository associated with it.


Note:
1. Both Action and Functions are block of code.
2. You can call Function in an action, By associating its
file to QTP Script. You can aslo have QTP features called in
a Function, i.e. you can also call an Action in a function.
However, that Function can only used by QTP.

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 types of object repositories? Which one is you using?

610


What is difference between run time object and test object?

544


How you calling actions in qtp?

617


Will down time for server and content maintenance/upgrades be allowed? how much?

604


• What type of testing questions will be asked for 2+ yrs exp people in interview?

1243






Does QTP run in any environment?

599


Where to use function or action?

663


What are the advantages of Object Repository?

574


Can any one send me the QTP Basic Coding Samples?

1600


How to find a window is minimized or not

1433


How to modify the text checkpoint?

607


What is the parameterization?

570


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

567


1. What is the difference between Keyword and function in the keyword driven framework? 2. How do you associate Keywords to the script ?

975


How can you close the second opened browser?

791