The Robot View
The Robot View With a Robot

The Robot View is located just at the top of the Robot Editor just below the tabs. The Robot View shows you the robot program — that is, the steps and connections that make up the robot. It is in the Robot View that we navigate in our robot (e.g. select steps) and edit its structure (e.g. delete, move or connect steps). In the following, we will give a short description of how you do this.

Current Step

Current Step

In the Robot View there is a notion called a current step. The basic idea is that the partial robot that you are building is actually executed while you are building it. The current step marks the position in this execution and the Studio shows the state for this in the Page View and Variables View. The current step is marked with a green color. If you left-click a step, the robot is executed up to that step, if possible, such that the step becomes the current step. While the robot is executing, the step you left-clicked will be shown in yellow and when execution reaches the step it becomes green and will be the new current step. If execution cannot reach the clicked step (e.g. because a HTML page could not be loaded) then execution stops at the last step it could reach on its way to the new step, and this step will become the new current step. If you click on a step that the robot has already executed to then no execution will take place, but the new step will immediately become the new current step. It is always the current step that you configure in the Step View.

Current Execution Path

Another notion is that of a Current Execution Path. This is the path in the robot that the execution went through to get to the current step and the path that the robot would continue along until it would reach the end of some branch in the robot. The current execution path is marked by a darker color on the connections. You can change the current execution path by clicking on a connection which will result in this connection being included in the path.

Selection

Selected Step

You can select more than one step or connection by holding down the Ctrl key and left-clicking the steps or connections. You can also hold down the left mouse button and drag it over the steps to mark. To deselect the currently selected steps and connections just click somewhere outside of the robot.

When steps or connections are selected, you can apply actions to them. For example, you can insert a new step following a selected step by first selecting the step after which you want the new step to be inserted and then clicking the icon in the toolbar. You can also right-click on a step or connection to bring up a pop-up menu. If you do this on a step or connection that is not already selected, then it automatically becomes selected.

Edit Actions

The Robot Editor lets you perform a long range of actions on steps and connections. These include standard editor actions like copy, paste, cut and delete, but also actions that affect the execution of the robot in the design view, e.g. changing the iteration of a loop. You can perform actions on either the current step (if no other step is selected), on selected step(s) or on selected connection(s). An action may be performed by clicking the corresponding toolbar button or by popup menus on the selected elements. There are also keyboard shortcuts for most actions. These are shown in the tool tips of the toolbar buttons or popup menu items.

You may configure another step than the current by selecting it (by either Ctrl-clicking on it or dragging a selection box around it) and pressing the F2 key or by choosing "Configure Step..." from the popup menu. This will open a Step Configuration dialog that gives you the same options as the Step View.

Grouping and Ungrouping Steps

Two edit actions that we will describe in more detail are the actions for grouping and ungrouping steps. You group steps by selecting the steps to group and then use the Group action () from either the toolbar or the popup menu on the steps. Some selections cannot be grouped. A group step must have exactly one ingoing connection and exactly one outgoing connection, so this must also hold for the selection of steps that you want to group. The only exception to this is that if your selection of steps does not have any outgoing connection then the selection can still be grouped, but in this case the topmost End step is connected to the end of the group and the created group will have a connection to a new End step outside the group. Take a look at the example robot below.

An Example Robot

In this robot, the following are some examples of steps you can group:

and the following are some examples of steps you cannot group:

An expanded group step may be selected by either clicking (while holding down the Ctrl key) close to the connection or by including it in a drag selection.

You ungroup a Group step (or steps) by selecting it (or them) and use the Ungroup action () from either the toolbar or the popup menu on the steps. The Group and Ungroup actions are inverse, so if you group a selection of steps and immediately ungroup them again, the structure of the robot is unchanged.

The Robot View also contains actions to expand or collapse more than one group simultaneously. The toolbar actions and expand or collapse all Group steps in the robot. The similar actions and found in the popup menu on steps will do the same, but restricted to the Group steps in the selection.

Drag and Drop

Another way of editing a robot, apart from using actions, is by using the mouse to manipulate elements directly. You can directly move a step by clicking on it and dragging it. As soon as you drag the step, special indicators will appear showing where you may drop it. You can also select several steps and move these together. You can also move the endpoint of a connection. You do this by first selecting the connection. Then you move the mouse to one of the handles at the end of the connection, click on the handle and move this to a new location. As soon as you click on a handle special indicators will appear showing where you may connect the connection. To abort a drag and drop action, move the mouse outside the robot and let go of the mouse button as shown below:

Drag and Drop a Step

Adding a New Connection

You can also create new connections using the mouse. Place the cursor near the end of a step so that an indicator appears (an orange circle with a green halo). Click on the indicator and a new arrow will appear. Keep the left mouse button pressed; move the mouse and a new connection will follow your mouse when you move this around (see image below). New indicators will appear and you can then move the mouse to one of these and drop the new connection end point there by letting go of the left mouse button.

Adding a New Connection

Undoing and Redoing Changes

Everything you do when you edit a robot you can undo and redo. So you don't have to fear accidentally dropping a step at a wrong position or deleting a connection. You can always just press Ctrl-Z (or click the icon) one or more times to undo what you just did and you can press Ctrl-Y (or click the icon) to redo (if you happened to undo too much).

Step Validation

While you edit your robot, the Robot View will validate your steps and any invalid steps are underlined in red. If you move the mouse to an invalid step, an explanation of why the step is invalid is shown.