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 a Open Variable step action. The easiest way to do this is to right click on the variable in the Variables View and select the menu option Insert Step > Open Variable. Figure below show how to open an attribute of a JSON variable of complex type.

Inserting an Open Variable Step Action from the Variables View

When you have chosen the Open Variable option from the menu a Open Variable step will be inserted in your robot before the current step, this will be executed and a new window will open showing the content of the variable. In this way the Open Variable step action behaves much like the Load Page step action. If the variable has already been opened then no new window will be opened, but the window containing the variable will become the new current window. In this way the Open Variable step action behaves different 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 as long as these are also or a type that may be opened in a window.

Once a variable (or attribute) has been open you work on it just as you would on a document (e.g. an XML document) loaded from a URL. You can insert step action to operate on the variable by right clicking in the view and the insert steps will work on the current window whether this is loaded (opened) from a variable or from a URL. The only real different is that document loaded from a URL may not be modified, these are considered immutable. If you want to modify a document you must first extract this into a variable and then modify this.