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
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 |
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 |
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 |
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 |
Answer / sandeep
diffrence is Function can return only single value whereas
Action can return multiple values.
| Is This Answer Correct ? | 8 Yes | 6 No |
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 |
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 |
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 |
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 |
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 |
CAN SOME ONE TELL ME ABOUT QTP FRAMEWORK? I AM SUPPOSED TO GIVE THE QTP FRAMEWORK THIS WEEK SO PLEASE HELP
How to find which type of Framework is suitable for which type of application?
WHAT IS OBJECT REPROSITORY?
How to create a Runtime property for an object in QTP?
Which line will be executed 1-B(DP).P(OR.link(DP) 2-B(OR).P(Or).Link(DP)
Does QTP have any limitations?Can it work with all kinds of programming languages like java,springs,ajax ,hybernet?Also does it work well with windows 7.What are its other limitations
Hi ,Can any one pleas explain how to test splash objects using QTP?
How will you send values to a cell in a webtable using QTP?
how to retrieve data from flight resevation->reports
What is the latest version of QTP? aster googling i found it 9.5 . but somewhere in my frnds resume i hve seen 10.0 so i am a bit confused pls let me know.
Where virtual objects stores results?
Explain how to use QTP to check broken links on a page?