The error message "Cannot run because no agents are defined" means that you are missing agents configuration setup in LEAPWORK Studio.
There are three ways to run a flow/test case:
- Run in Preview mode: When you press the "Run" button in the Flow editor, LEAPWORK Studio runs flow in Preview mode. This mode allows to use your displays directly and that’s why you don’t need to specify anything particular and can simply run it.
- Run from the Flows panel: LEAPWORK tries to run a flow or all flows in the Folder when a user presses the Run button on the Flows panel (shown below). Before starting flow execution LEAPWORK checks for the execution agent where all selected flows need to be run, if NO agent is defined earlier then "Cannot run because no agent are defined" message is shown to the user.
- Run from Scheduler: LEAPWORK tries to run all flows defined under Schedule when a user attempts to run Schedule on Ad-hoc basis or if a schedule is auto-triggered by Scheduler. Before starting flow execution LEAPWORK checks for the execution agent defined under the schedule, if NO agent is defined earlier then "Cannot run because no agent are defined" message is shown to the user.
Setting up a default agent will resolve this issue. To be able to do that please follow below steps:
- Go to "Agents" – Click on "New"
- On the "Settings" window fill in the "Title" field and type machine name or IP of the machine where LEAPWORK Agent is installed. If you've installed it on the same machine as the studio, you can type "localhost" in the "Hostname" field.
- Now select the newly created agent before running from Flows panel (shown below)
- Bind your schedule with this agent (as shown below).
If the issue continues, please contact our Priority Support.