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

What r the different filters in defect in quality center

3285


Is there anyway to automatically update the Datasource name in Database Checkpoints object when we migrate tests to a new release?

3273


Hi Samrat, Thank u very much, what u said it is right.

1347


How to use Environment parameterization? Explain with an example.

1481


Functions call by reference and call by value. i want the diff b/n these 2 and how will be the script for this?in which situation we use these 2..?pls explain me clearly

1253






How will you check that your test cases covered all the requirements?

566


What if recovery scenarios is also failed for identify the alert ? (We are handling unexpected popup through recovery scenarios but if still recovery scenarios also failed than what should be the approach)

1015


What is the architecture of your project? Can any one answer for this question plz........

1412


What is the difference between Keyword Driven test and Data Driven test?

1773


hi all can anyone explain how to write the code for finding the mandatory columns in table which are having (red*) (red Astrik)

1403


What are the ordinal identifiers in web page?

640


How did you resolve conflicts present in Object Repository?

1616


How to check feasibility of the appliction?in automation testing?

1474


I opened gmail login into gmail and i have to save (Pass or move) all the mail into notepad please give me code Thanks of all

1524


How you can make an action as re-usable action?

656