Vous êtes sur la page 1sur 1

QTPWorld http://www.qtpworld.com/index.php?

cid=53

Login | Search QTPWorld.com

Chapters Difference between Action and Function


Upcoming Trainings
Difference between Action and Function?
QTP Interview Questions
Action is a collection of Vb statements in QTP. It does not return any values.Function collection of Vb statements in QTP.
VB Script - Part I It returns single value.

VB Script - Part II We can call functions within actions but we can't call actions within functions

VB Script - Part III Generally functions are saved with ".vbs" extention where as actions will save with ".mts".

Working with Files using FSO Every Action will have its own Datatable where as function does not.

Excel Action can have a object repository associated with it while a function can't. A function is just lines of code with
some/none parameters and a single return value while an action can have more than one output parameters.
Actions
Action can contains Object Repository, Data table, Active screen etc. whereas function do not have these features.
Functions
Action is internal to QTP whereas Function is just lines of code with some/none parameters and a single return value.
Difference between Action and
Function Action can/can not be resuable whereas functions are always reusable.

Parameterization Action Parameter have default values whereas VB script function do not have any default values.
Object Repository Action parameter type are byvalue only where vbscript functions can be passed byref.
Descriptive Programming
Action can have multiple output(returning) values whereas function can return only single value.
Regular Expression

Error Handling & Recovery


Scenario

Output Values

Database Connections

Automation Object Model

Synchronization

Environment Variables

XML

Outlook

Reporting Defect

Contact Us

info@qtpworld.com
+91- 9886477710

Copyright QTPWorld.com 2013 Home | Demo videos | Students | Training | FAQ's | Feedback | About Us Designed By WebZone

1 of 1 1/29/2016 8:22 AM

Vous aimerez peut-être aussi