Set a context variable manually

You can set a context variable manually using the Set Context Value action when adding a new step during execution or on the canvas. On the canvas, you can set a context variable in Basic Mode or Advanced Mode. Here, we walk you through the canvas procedure in Basic Mode.

Once you have set the context variable, you can then use it in any field that allows data input by entering the variable name.

To set the value of a context variable manually:

  1. Access the canvas.
  2. In Basic Mode, create a new test step and select Variables > Set Context Value.
  3. Specify the following:
    • Name of Variable: The variable name consisting of characters only, such as var1. Special characters or spaces are not supported.
    • Value of Variable: The value you want to assign to the variable, for example a first name, last name, or email address.
    • Transformation:
      • Select None to leave everything as is.
      • Select Number to strip a variable value that consists of number and letters off its letters and keep only the numbers. Number is helpful when you use the Check variables option because it lets you use variables in expressions as part of a mathematical equation.
      • Select Number as String for email content starts with a 0 (zero).
  4. Save your test.