Variables

Variables allow your automation scripts to capture and store dynamic values (like generated Order IDs or random email addresses) during a live execution, and instantly reuse them later in that exact same test case.

Currently, Robonito supports Local Variables, which are strictly scoped to the lifecycle of a single test execution.


1. Recording a Local Variable

To capture a dynamic value from your application during a recording session:

  1. Start Recording: Begin recording your target test case.
  2. Open Variable Tool: In the Robonito recording overlay toolbar, click the Record Local Variable action icon. Record Variable Tool
  3. Configure the Variable:
    • Variable Name: Enter a recognizable string (e.g., checkoutOrderId or temporaryEmail).
    • Value: You can explicitly type a static baseline value or use the targeter to extract text natively from a DOM element on the screen.
  4. Save: Click Save Variable.

An independent LOCAL-VARIABLE step is immediately inserted into your execution flow. This step will autonomously capture and bind the target value from the application memory whenever the test runs.


2. Using a Variable

Once a variable step is successfully recorded in the flow, you can map it to downstream actions like Input Fields or Assertions.

  1. Trigger an Input Action: Navigate to a text input field in your application and click it.
  2. Open Use Variable Tool: Instead of typing text on your keyboard, click the Use Variable icon in the Robonito overlay toolbar. Use Variable Tool
  3. Select the Variable: A dropdown dialog will appear containing all Local Variables correctly initialized before this current step. Select your target variable (e.g., checkoutOrderId).
  4. Inject: Robonito will record the input step heavily binding the logic to the variable reference rather than a hard-coded string.

Technical Constraints

  • Local Scope Limitations: Variables cannot be shared across different test cases or test suites. They exist only inside the sandbox of the active script.
  • Volatile Memory: Variable values map entirely to runtime memory and are completely wiped when the test execution terminates.
  • Sequential Requirements: A variable must be extracted and recorded in the timeline before you can attempt to use it in a subsequent step.