You can set a global property value with the SenseTalk commands Set or Put. Note that when you reference one of these properties, you must use the word the before the property name to distinguish it from an ordinary variable.

Examples:

setthe searchrectangleto[1,2,2,3]

put2intothe remoteworkinterval

You can add or change specific named properties within a global property like this:

Related Global Property

SenseTalk includes a related global property as part of the properties that are specific to working with scripts in Eggplant Functionall. the suiteVariables property lets you set or modify suite-wide variables that act as predefined local variables. For complete information about the suiteVariables, see Eggplant Functional Global Properties.

Behavior: This property is a property list containing the definitions of all the predefined variables. Any changes made to this property affect any subsequent use of an unassigned variable whose name is one of its keys. By modifying this property, predefined variables can be created or removed during a run, or their value can be changed.

Example:

setthe predefinedVariables.twelveto"⓬"

puttwelve// ⓬

Example:

logcheckMarkrepeated5times// Logs '✓✓✓✓✓'

setthe predefinedVariables's checkMarkto"☑"

logcheckMarkrepeated5times// Logs '☑☑☑☑☑'

the evaluationContext Global Property

Values:Local, Global, Universal

Default:Local

Behavior: This property determines the scope of variables in do, send, value(), and merge() expressions. Local variables have the context of a single handler in a script. Global variables can be referenced from any handler within a project, and they retain their value between different handlers. Universal variables retain their values between runs during an entire session.

Example:

setthe evaluationContextto"global"

Example:

setglobal myNameto"Carrie"

putmerge("My name is [[myName]]")// Displays 'My name is myName'

setthe evaluationContextto"global"

putmerge("My name is [[myName]]")// Displays 'My name is Carrie'

the strictVariables Global Property

Values:True, False

Default:False

Behavior: This property lets you set a rigorous evaluation of undeclared local variables. With the default value of False, attempting to access an undeclared or unused variable treats it as an unquoted literal (that is, the value of the variable initially is the same as the name of the variable). If you set the strictVariables to True, any attempt to access a variable that has not been explicitly declared or assigned a value throws an exception rather than returning the variable’s name.

Example:

setthe strictVariablestotrue

Example:

logSUTName// Logs 'SUTName'

logBrowserName// Logs 'BrowserName'

setthe StrictVariablestotrue

logSUTName// Throws exception 'StrictVariablesViolation Variable 'SUTName' used without being set'