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

Answers were Sorted based on User's Feedback



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

Answer / jaspreet

1. Function is a feature of Vb Script whereas Action is specific to QTP.
2. Action is associated with object repository whereas Function is not associated with object repository
3. Function can have at maximum one output value whereas Action can have many outputs.
4. Functions is just logical instructions which are not associated with objects whereas Action is associated with objects

Is This Answer Correct ?    7 Yes 0 No

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

Answer / vijay

Actions can Return mutiple values, where as function will
return one value
Check points insertion wont be possible in functions where
it can be possible in Actions .
functions can be called outside the tool , where as Actios
are called only within QTP
scripts written in higher version of qtp wont be compatable
with Actions , where as functions since they are not QTP
related can be work in any version

functions can be even written in notepad , wiht .vbs file
name

ex :

Public Function F1
msgbox(" I am function")
end function
call F1

run the code in notepad and verify

Is This Answer Correct ?    6 Yes 0 No

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

Answer / sreekanth

Action -> Action is nothing but a script written for certain
function point .
Action types ; Non-reusable , reusable , external
Action may return multiple values .
Action requires its own object repository( requires objects)
Actions concept i restricted to QTP only ..

Function -> it consists of Set of statements written to
achieve a particular task.
Function returns one value.
Functions concept is used all programming
languages,scripting languages.

Types of functions in QTP->Built in ,Local Script,Library
functions.
WIthout using objects Functions can be written ( in
descriptive programming )

Is This Answer Correct ?    12 Yes 8 No

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

Answer / pratap

Action will have object Repositery associated with it
Function will not have .
Function has only one return value
Action can have many return values
A function can be external declared and called from
liberary files.
Action cant.

any Query contact : prataphs@gmail.com

Is This Answer Correct ?    8 Yes 5 No

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

Answer / sandeep

diffrence is Function can return only single value whereas
Action can return multiple values.

Is This Answer Correct ?    8 Yes 6 No

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

Answer / arun

the difference between action and function is
action has object repository.
function doesnot have object repository.
we can edit copy of actions.it may not effect on main action
we cannot edit the copy of function. it my effect on main
function.

Is This Answer Correct ?    6 Yes 5 No

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

Answer / 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

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

Answer / nagk24

Actions and functions both purpose is reusable but there is some technical differences 1.e
1)function can't return multiple values bur action does
2)functions are can use in vb script and qtp but acton only available in qtp
3)functions dint have a object repository concept,bur actions have
4)functions supports backward compatable,bur actions are not
5)action has check point conncept,but functions doesn't

Is This Answer Correct ?    1 Yes 0 No

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

Answer / prem

Action- Action is nothing but a step performed by user.
Action is catagorized in two parts
Reusable action,usable action.

Function-In that action what functionality u r written to
check that function is working properly or not.
e:g - if you write a script for the login page,the total
script is written for the login page is a action,and the
script was written for the login page is the
function,because main functionality in the script is login
the page.

if it wrong reply me

Is This Answer Correct ?    0 Yes 1 No

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

Answer / raman verma

1.FUNCTION WILL RETURN ONLY SINGLE VALUE BUT ACTION CAN
RETURN MORE THAN ONE VALUE.
2.ACTIONS CAN USE IN OTHER ACTION AS FUNCTIONS BUT WHEN WE
COPY THE ACTION IN OTHER ACTION AND EDIT THAT ACTION ...iT
WILL EFFECT THE MAIN FUNCTION BUT FUNCTION CANT.
3. ACTION IS OBJECT REPOSITORY ABUT FUNCTION DONY

Is This Answer Correct ?    2 Yes 4 No

Post New Answer

More QTP Interview Questions

how to test one edit box using Java addin for Web Applications? write script?

1 Answers   IBM,


what are inputs for automation?

3 Answers  


plz tel me what is the differnce between QC & QTP?

3 Answers   iGate, Satyam,


I want to open a text file and then search some specified text in it and then replace that text with some other text i found that text in .txt but do not know how to replace that text can any body help me. if possible put the code for qtp

2 Answers  


Explain about import and export files?

1 Answers  






Can we put more than one action in a single script???? yes or no.....

2 Answers   BirlaSoft,


How to import excel sheet to QC?

1 Answers  


How do we call Library Files(.vbs) in the Test Script Thanks in Advance...

6 Answers  


How to manage a drag drop event in the qtp

3 Answers  


Suppose I have three hyperlinks with same properties. How to solve this and what are the ways to solve this. we can solve this by using index property but what are the other ways we have have to solve this problem. Login (href: btnlogin.aspx) Login (href: Sourcelogin.aspx) Login (href: homelogin.aspx)

0 Answers  


Explain QTP Testing process ?

13 Answers   TCS,


PLS REAL TIMERS WRITE THE ANS FOR THIS? WHICH SCRIPT IS USED IN REAL TIME NOW A DAYS 1)SHARED REPOSITORY BASED SCRIPT 2)DESCRIPTIVE PROGRAMMING BASED SCRIPT?

1 Answers  


Categories