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 |
How can we change the .mtr file to .tsr file and vice-versa
where exactly we can't do the automation testing. give some examples
1. How can we use same object repository and Testscript which is in English flavor to check the application in different languages thru QTP?(Chinese,Dutch,French) - I generated script in english and want to use the same script with different languages? - for windows i used regular expressions - I need for edit box,button and combobox, (English,French,Dutch,Chinese) These are the properties of a button in different languages Properties English Dutuch Chinese French x 400 758 631 601 y 673 603 592 676 windowstyle 1342242816 1342242816 1342242816 1.34E+09 windowid 2 2 2 2 windowextended style 4 4 4 4 width 120 120 120 120 visible TRUE TRUE TRUE TRUE righttoleft reading FALSE FALSE FALSE FALSE righttoleftlayout FALSE FALSE FALSE FALSE rightaligned FALSE FALSE FALSE FALSE regexpwndtitle cancel Loschen Chinese language Annuler regexpwndclass button button button button objectclass button button button button hwnd 132872 657228 656932 656782 height 33 33 33 33 focused FALSE FALSE FALSE FALSE enabled TRUE TRUE TRUE TRUE attached text abs_y 669 599 627 597 abs_x 396 754 588 672 text cancel Loschen Chinese language Annuler nativeclass button Button ordinal Identifier type,Value none none none none smartidentification FALSE FALSE FALSE FALSE comment
Explain the concept of object repository and how quicktest professional (qtp) recognises objects?
What is the synchronization point in qtp?
how to get the object count ?????????
can u Give Procedure to Handle Pop Window & write Code for that
how to create external data table?
do you prepared framework,pls answer this
give me an example where u used good judgement and logic in solving a problem
How to test fly out menu in qtp?
What are the different properties of an web object