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.
The easiest way to do this is to right-click the variable in the Variables View and select the menu option .-
In the Variables View, right-click the variable and select
.
When this step is executed, a new window shows the content of the variable. In this way the Open Variable step behaves much like the Load Page step.
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 behaves differently from the Load Page step and more like the Set Current Window step.
Even though the step 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 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.
-
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.
An Open Variable step is inserted in your robot before the current step.
- Right-click the variable and insert a step to operate on the variable.