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

Explain advantages and disadvantages of ddf?

797


Name the properties you would use for identifying a browser and page when using descriptive programming?

744


Mention the test steps of qtp.

741


what is the diff between manual test plan document and automation test plan doc.can u explain indetail.

1858


write script for bitmap image?

1765


how can we do the frame work in qtp

1794


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

872


Connect to QC using AOM.

1463


Explain the new feature of UFT regarding the export of test results?

786


In QA Testing when do you use Loadrunner vs QTP? What are the main differences between those two tools? Explain the purpose with real world scenario examples...In advance thank you!!!

2622


What are the advantages of qtp?

758


What are the differences between qtp and winrunner?

732


Explain the concept of how quicktest professional identifies object?

729


what difference between runtime object and text object and what property they have. whether they have same properties or different properties.

1938


How do Parameterization and Data-Driving relate to each other in QTP?

812