what is the difference between functions and actions

  • Questions
  • what is the difference between functions and actions
Question ID: 105835
Marked as spam
Posted by (Questions: 9, Answers: 3)
Asked on January 16, 2015 11:46 am
Answers (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