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

my assignment is,how can i differentiate between readed & unreaded mails in my inbox ?, since for both readed & unreaded having same properties for both test objects &run time objects

2 Answers  


WHAT IS THE DIFF BTW KEYWORD DRIVEN TESTING AND DATA DRIVEN TESTING?

1 Answers  


what are the critical test cases in crm? tell me atleast 5 critical test cases? what are the critical bug u find out while testing crm domain?

0 Answers  


how can i pass parameters into function?

4 Answers   Livetek,


how will u choose a tool for test automation ?

1 Answers  






1.In VB Script 100 lines Script. How can check the Syntax errors? 2. Write a VB Script for X = India/Srilanka/Australia/England/South Africa.I need the Output Country wise? [ 1st Msgbox India , 2nd Msgbox Srilanka] ---- 3. How can Choose these test cases to be automated?

5 Answers   HP,


how to test use the quality control .how to verify the image verification

0 Answers   Wells Fargo,


How to use Regular Expressions in QTP? give an example.

10 Answers   ABC, Accenture, Ordain Solutions, SCL,


Pls let me know completely about descriptive programming, where it is used, pls explain with a real time example of its occurence and the program code written in qtp.

3 Answers  


Plz give the vb script for the following scenerio I have faced one issues while doing test in QTP. I have described the scenario below. 1. I have to test web application.In that i want to select from the drop down values in the application. 2. Suppose Drop down has 5 value "A,B,C,D,E".I would like to give value from data table of QTP. 3. For every iliteration it should select A,then B and so on

0 Answers  


hi i have completed my b.tech in cse stream. now i am working in an organisation in testing department. i want do sap course but i dnt know which module will boost my career can anyone suggest me which is good for my career

0 Answers  


waht is the difference between QTP 8.2 and 9.0 version

15 Answers   AppLabs, CTS, Polaris,


Categories