Skip to main content

Set Scripting Variable

This logic hook will either create a new variable with the specified name and value or overwrite the existing variable with the new value. It can be used as either a Bot or User Step.

  1. On the left navigation pane, head to Botium Tools & Settings > Test Sets > Your Test Set > Test Cases
  2. Click the + NEW button to add a new Convo, or select a previously created test case from the list.
  3. Add a new + USER STEP or + BOT STEP
  4. Click the Edit icon, or anywhere inside the step, and search the list for the 'Set Scripting Variable' logic hook.

  5. Configure the Logic Hook:
    1. Variable Name: Specify the name of the variable. Usually, start the variable name without "$". Use "$" only if you need logic hook argument replacement.
    2. Value: Enter the new value you wish to assign to the variable.

  6. Click the APPLY CHANGES button to complete the step entry.

Note:
Example Botium Script:
#bot
SET_SCRIPTING_MEMORY myVariableName|myVariableValue

Explanation:

  • SET_SCRIPTING_MEMORY initiates the action to set the scripting variable.
  • myVariableName|myVariableValue assigns the value myVariableValue to the variable myVariableName.

For more information on using scripting variables, please read the article Using the Scripting Memory.

Was this article helpful?

0 out of 0 found this helpful