what is the difference between functions and actions
Tags:
Question ID: 105835
0
0
Marked as spam
Posted by (Questions: 9, Answers: 3)
Asked on January 16, 2015 11:46 am
209 views
Answers (1)
1
Private answer

While you could technically accomplish many of the same things with both actions and functions, Actions tend to be structured as smaller tests containing objects, checkpoints, data-driven values, etc. that can be used in multiple scenarios, such as a login, logout, SelectItem, Checkout, etc.

Functions tend to be designed to not rely on objects in the repository, no checkpoints, data table dependencies, etc. They are useful for things like calculations, data manipulation, etc. that can be shared amongst multiple scripts. Functions can be placed in library files and associated with QTP/UFT. Functions can also return a value back to the main script that called the function. They can also make scripts easier to read by 'hiding' more complex code in the libraries outside of the automation script.

Marked as spam
Posted by (Questions: 2, Answers: 477)
Answered on April 1, 2015 2:06 pm
EyeOnTesting

Welcome back to "EyeOnTesting" brought to you by Orasi Software, Inc.

X
Scroll to Top