Open a Variable

To work with a variable (or an attribute) in a window, you must first open the variable in a new window. You do this with an Open Variable step action.

The easiest way to do this is to right-click the variable in the Variables View and select the menu option Insert Step > Open Variable.
  1. In the Variables View, right-click the variable and select Insert Step > Open Variable.

    When this step is executed, a new window shows the content of the variable. In this way the Open Variable step action behaves much like the Load Page step action.

    If the variable is already open, no new window is opened; but the window containing the variable becomes the new current window. In this way the Open Variable step action behaves differently from the Load Page step action and more like the Set Current Window step action.

    Even though the step action is call Open Variable, it also works on attributes of variables if they are also of a type that may be opened in a window.

    Once a variable (or attribute) is open, you work on it just as you would on a document (such as an XML document) loaded from a URL.

    You can insert a step action to operate on the variable by right-clicking in the view. The insert steps will work on the current window whether it is loaded (opened) from a variable or a URL. The only real difference is that document loaded from a URL may not be modified, and it is considered immutable. To modify a document you must first extract it into a variable and then modify it.

  2. On the Variables tab, right-click XML or All New and select configuration options.

    The following figure shows how to open an attribute of a JSON variable of complex type.


    Inserting an Open Variable Step Action from the Variables View

    An Open Variable step is inserted in your robot before the current step.

  3. Right-click the variable and insert a step action to operate on the variable.