Function

A Function action runs a single function or composite set of functions from the registered set. Functions and expressions are loaded from a folder that is contained within the Classes folder in the project and is available to all users of the project.

Expressions that are used as parameters can be strings, numerical values, or tags. Tags can be entered manually from The Tag Data Store.

Expressions can be written in any of the following forms:
  • Chai
  • ECMAScript (such as JavaScript)
  • Legacy functions
  • Other scripting languages (requires customization)
Functional run dialog box

Right-click the background of the text box and click Test from the menu to test the expressions, specifying temporary values for any tags. If you use list tags in these expressions, you must supply the complete list of values for the list tag, enclosed in braces. For more information about list tags, see Repeating elements and list tags.

By clicking the Store tab, you can store the value that is returned by the function into a tag:

Store tab

Tags cannot be created in the Function step; they must already exist in the Tag Data Store of the test. If you write data to the tag variables inside the Function action, the values are saved into the test tags on exit and you can access those values in later test actions.