Definition and Usage
The Set variable command is used to assign values to variables that can then be reused throughout your automation workflow. It allows you to initialize a variable and store data like strings, numbers, objects, arrays etc. Common use cases include:
Storing locator values like URLs, credentials, server names etc. to be reused instead of repetition
Configuring workflow settings like delays, timeouts, retries, batch sizes etc.
Reading data from files/databases and storing it in variables for further parsing/manipulation
Environment-specific configuration variables for easy switching between production vs staging
Reusing fixed values required in multiple places across the automation workflow
Branching workflow logic based on conditional checks using variable values
Extracting and storing sub-values from larger strings/objects
Intermediate computation step values to break complex operations into smaller steps
Dynamically generating identifiers, keys for iterations based on business logic
Global constant declarations for standard system values
Caching extracted data from costly operations to avoid re-computation
Parameter Values
Set parameters
Parameter | Description |
Type | Select the variable type
|
Value | Enter the value of the variable |
Name | Save the variable |
Error Handling
Parameter | Definition |
When error occurs | Select the action to be performed when an error occurs
|
Example
The above workflow sets 1 to a number variable named Number.