Conditional

In this step, you can specify a Boolean condition that affects the execution of the steps in your robot. This step is often used within the Loop.

Properties

Name
Name of the step.
Condition

A modifiable list of Boolean conditions, each associated with a branch of the robot.

Behavior
When executing the step, the branch belonging to the first condition that evaluates to true is executed. All other branches are skipped. If there is no branch that matches, the step does nothing, and the robot proceeds to the next step.

Example 1



In this example, a string is checked for a specific value. If it matches, an error is thrown with the Throw Error step; otherwise, the string is checked for another specific value and a message is logged with the Write Log step. In all cases, including when none of the conditions are true, the robot proceeds to the Return step.

It is possible to create a conditional branch with the condition of true, as shown in the following example. This branch will always be executed if none of the preceding conditions are true. As at least one of the branches will always be executed, the step cannot be implicitly skipped if none of the conditions match.

Example 2

This example is similar to the previous one, with the difference that if neither of the first two branches matches, the execution proceeds to the Return step, and the robot is exited immediately.