1.

What is the difference between functions and actions in QTP?

Answer»

In QTP, Actions are written VB scripting language which doesn’t return any values. Functions are written VB scripting language which returns single value.

Every Action contains its own Object Repository, Data table, Active screen, etc where as function does not.

Function can be called in action, but action can’t be called in function.

In QTP, functions are saved with ".vbs" extention where as actions are saved with ".mts" extension.

Action is internal to QTP whereas Function is just lines of code with some/none parameters and a single return value.

Actions are sometime reusable but sometime not whereas functions are always reusable.



Discussion

No Comment Found