what is the difference between action and function

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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Want to verify notepad reports using QTP framework or any other BV script method. Can anyone share the method to achieve it? Eg. Person Name is the header and the actual name is John then how can we verify weather person name is John

2165


Hi, can explain the draw back of manual testing.plz send me the answer to my mail id deepthip1985@gmail.com

1411


Output values? i want a practical example

1309


I am getting an error "failed to open the XML checkpoint result viewer" in result window,after clicking on "View XML checkpoint results".Someone suggest me settings,if any...

1458


What is the basic concept of quicktest professional (qtp)?

577






What are the different types of recovery operation?

549


How to do the scripting. Is there any inbuilt functions in qtp as in qtp-s. What is the difference between them? How to handle script issues?

562


What is the limitation to XML Checkpoints?

1599


What is quicktest professional?

552


What are some test assets and related extensions of qtp?

551


What is synchronization? What are the ways you can synchronize?

646


If an application name changes frequently i.e while recording it has the name, in this case, how do qtp handles?

579


Dear Friends, I having total 3+year experience in manual testing including automation testing QTP, if i am attending any interview what kind of question will i get? please help me out

1577


How will you test a keyboard?

599


In application which areas to be automated and what kind of situation will be take? using QTP? Plz give me the clear answer

1933