what is the difference between action and function

Answers were Sorted based on User's Feedback



what is the difference between action and function..

Answer / pratap

Following are simple and easy to understand how function
differs from Action .Go through

I)
Actions : actions are more specific to tool ex : qtp
Functions : functions are generic and feature of programing
language Ex : vb or java or C , C++.

II)
Actions : actions are associated with object Repositry (
Per action or shared dependnds )
Functions : functions don have object repositry associated
with them .

III)
Actions : Actions can be called by syntax :
RunAction "ActionName",OneIteration
Functions : functions can be call by syntax
Call Function(FunctionName)

Is This Answer Correct ?    31 Yes 3 No

what is the difference between action and function..

Answer / raj

Hi guys,
Here is the best differences........
1)We can use actions within QTP where as we can use
functions anywhere(i.e.outside QTP also)

2)We can call functions within actions but we can't call
actions within functions

3)Generally functions are saved with ".vbs" extention where
as actions will save with ".mts".

If you have any doubt Still you can shout at my mail

Regards,
Rajasekhar

Is This Answer Correct ?    24 Yes 6 No

what is the difference between action and function..

Answer / bharat

Functions can retun multiple values through arrays
Action can directly throe a value into different varaible
(Output PArameters)

Functions does not have any associateion with
ObjectRepository,Recovery Scenerio,Checkpoints and hence it
need QTP toll to make this assocaition

Actions can be called for multipe iterations
in function u need to write a loop structure to execute it
multiple time

Is This Answer Correct ?    6 Yes 1 No

what is the difference between action and function..

Answer / namitha

Shailaja good work...

Is This Answer Correct ?    4 Yes 3 No

what is the difference between action and function..

Answer / sailaja

Few of the key differences between reusable actions and
functions here.

Passing Data

Actions - can only accept primative data types as
parameters (strings, integers, etc)

Functions - can accept arrays, dictionary objects and test
objects (i.e. Pages, Frames, WebRadioGroups, etc.)

Resource Usage

Actions - For each action, there’s a folder, three separate
vbs files, a local Object Repository, a subfolder
containing snapshots, an Excel spreadsheet, and a few
seconds of load time.

Functions - There’s the code contained in the Function, and
that’s all

API

Actions - You cannot insert calls to Existing Actions
through the QTP API, you can only do it through the
interface

Functions - You can attach Function Libraries to Test
Scripts through the QTP API

Return Values

Actions - Return values are difficult to understand and
read in the syntax

Functions - Return values work like they do in other
languages (i.e. as lvalues)

Is This Answer Correct ?    8 Yes 8 No

what is the difference between action and function..

Answer / siraj

mostly both are same when you see the QTP scripting point
of view but when you comes to other languages these are
different. we don't use actions in other languages but
function are useful depends on scripting language

Is This Answer Correct ?    3 Yes 3 No

what is the difference between action and function..

Answer / naresh

See Why u r using Functions in your Project And Why u r Not using Actions.. I wnna Exact Difference... and

Is This Answer Correct ?    1 Yes 1 No

what is the difference between action and function..

Answer / balajireddy1980

Hi All,
Difference between Actions and Function is Action is having
repository but function don't have repository.


Thanks
Balaji

Is This Answer Correct ?    1 Yes 2 No

what is the difference between action and function..

Answer / roy

action: test for one module or one case
function : the combination of statements and "logical and conditional statements"
action: depend on testing process
function: depending on language like c, c++, scripting

Is This Answer Correct ?    1 Yes 3 No

what is the difference between action and function..

Answer / raju

1). we enhasing the scripts(Check points, output values)
insert in the action the actions allows but in the case of
functions it doesn't allow the enhasing the scripts.

2). Actions saved into the QTP but functions are saved into
the .vbs file

3). in the case of call copy action it won't reflect into
the child action to parent action but functions it will
reflect in to the child action to parent action.

4). Mainly very important use:
if at all call the Action the particular object information
stored into the object repository but in the case of
function when ever we call the function it doesn't stored
into the object repository.

if at all any wrong let me know.

raju.ippali@gmail.com
9823257761

Is This Answer Correct ?    9 Yes 12 No

Post New Answer

More QTP Interview Questions

Any one please tell me how to create framework in QTP (in detail). Is there any website for reference?

1 Answers  


i have opend 2 gmails i am working with 1 gmail i want to close other gmail by usig script. 2.i have 10 links in a page all of them have same properties& names i want to click on 5link by using script. 3.i have one combobox in that i want to see all the citynames in the combobox and i have to check weather hyderabad is present or not. 4. size of objectrepository. 5.what r problems we get during writing the script. 6.is it possible to compare to excel sheets in qtp if possible wht is the script. 7.example for lowlevelrecording

3 Answers   Semantic Space,


What is the Difference between copy to action and call to action?

0 Answers  


Write a QTP script to print all the link names displayed in a web page

4 Answers   TCS, Virtusa,


Can we test the Word Document using QTP Tool? We should test the page size,page set up, paragraph indentation and spacing, font size of the the character int the page.

0 Answers  






If an application name is changes frequently i.e while recording it has name, in this case how does QTP handles?

1 Answers  


Hi, I am working on microsoft infopath forms..It is standalone form..(not dotnet or web.) . I am not able to indentify any objects in it.. I am currently using active accessibility in the macro for the same but its execution is too slow.. Kindly help in case you have better solution.

0 Answers  


Explain the benefits of quick test pro(qtp)?

0 Answers  


PLZ EXPLAIN HOW TO LAUNCHING QTP IN TEST DIRECTOR? Is it possible or not? If No Why we r using qtp Td Combination? plz explain briefly? What is the purpose of TD With QTP?

1 Answers   Wipro,


Have you used xml check point in your project? How?

0 Answers  


How can I pass values from one action to another in QTP ?

8 Answers   Ordain Solutions,


what area in a web application cannot be automated.

1 Answers  


Categories