5. Agents

Leapwork supports execution of automation flows on remote machines. This allows for flows to run uninterrupted and provides the possibility to run the same flow in different configurations.

In the Leapwork Automation Platform, Agents are the available machines/devices on which the automation flows can be executed. The defined agents can be used when setting up [Schedules] or when running automation flows in preview mode.

Leapwork comes with six different types of Agent, each offering different capabilities:

  • Remote Agent – Leapwork Agent
  • Web Only – Selenium Grid
  • Web Only – Sauce Labs
  • Web Only – Browser Stack
  • Web Only – GridLastic
  • Web Only – LambdaTest

This section describes how to create a new Agent and goes through each Agent type in more detail.

Creating an Agent

To configure a Leapwork Agent, launch the Leapwork Studio and follow these steps:

  1. In Leapwork Studio, navigate to the 'Agents' section.
  2. Click on the 'New' button from the Agents menu

Agent Types

Remote Agent

The Remote Agent is the Leapwork proprietary run-time agent used for distributed automation flow execution. This type of Agent can be used for Web, Desktop UI, and Virtual Desktop automation.

To setup an Agent as a Remote Agent, select 'Remote Agent' from the ‘Agent type’ drop-down and fill in the form:

  • Specify a unique title for the Agent, e.g. “Local Agent”, “Remote Agent” or simply “Agent” etc.
  • If the Agent is installed on the same machine as the Leapwork Studio, the hostname can be specified as “localhost”. In other cases, specify the IP address, machine name, or DNS name for the remote machine.
  • The port should match the port specified as part of the Leapwork Agent installation on the remote machine. The default port is 6777, but this can be changed if needed.
  • Leapwork's build version 2020.1 and above uses Windows Credential Provider, which allows users to automatically login to Windows using the given credentials. The Agent password is used to login to the Agent with a simple password. This is deprecated and will be removed from Leapwork in a future release.
  • Choose the wanted screen resolution to use when executing automation flows on the remote machine. The list contains the available resolutions on the remote machine.
  • The primary display (denoted as Display 1) is the default Display; however, in the case of multiple displays, a particular display for flow execution should be selected.
  • The 'Description' field is optional and can be used to keep some notes/description about the Agent.

After specifying all values, test the Agent by clicking ‘Test connection’. If the Agent is set up correctly, Leapwork will open a terminal window and show the desktop of the host computer. At this point, you can choose to log in with the Windows account that you want the Agent to run with. This login will stay active until the Agent machine is restarted.

Save the configuration and the Agent is ready to be used.

More information about remote Agents.

Web Only – Selenium Grid

A Selenium Grid is basically a Selenium proxy with several Selenium Agent machines, so when an automation flow runs in the Leapwork Controller, it will send instructions to the Selenium Grid instead of a Leapwork agent.

VIDEO TUTORIAL: Selenium Grid

To set up a Selenium Grid, select the Agent type 'Web Only – Selenium Grid' from the drop-down and then provide the value for the fields below:

  • Specify a unique title for the Agent, e.g. “Selenium Grid”.
  • Specify the IP address, machine name, or DNS name for the Hub of Selenium Grid.
  • The port number should match the port specified as part of the Selenium Grid configuration. The default port is 4444, but this can be changed if necessary.
  • “Platform name” is an optional field and should only be specified if the automation execution is required to be done on a specific platform available on Selenium Grid, otherwise it can be left blank.
  • Choose the browser from the available drop-down list on which execution is required as a part of this Agent configuration.

    Note: The Microsoft Edge Legacy is replaced with the Microsoft Edge.
  • The browser version can be specified in case a flow has to be executed on a specific browser version. However, to test a specific version, the version should be available on Selenium Grid. Otherwise, just leave the field blank to run tests on any available version of the specified browser.
  • Choose the wanted browser resolution to use when executing automation flows.
  • The 'Description' field is optional and can be used to keep some notes/description about the Agent.

More general information about Selenium Grid.

Web Only - Sauce Labs

Sauce Labs is a cloud-based platform for automated execution of web and mobile applications.

VIDEO TUTORIAL: Learn how to set up an Agent for Sauce Labs.

In order to create an Agent pointing to a Sauce Labs device, you need to create an account with Sauce Labs.

Select the Agent type as 'Web Only – Sauce Labs' from the drop-down and then provide the value for the below fields:

  • Specify a unique title for the Agent, e.g. “Saucelab_WIN_FF”.
  • A Sauce Labs account Username must be provided.
  • A Sauce Labs account Access Key must be specified.
  • Choose the desired “Platform & OS” from the available drop-down list.
  • For the specified platform, choose the platform version from the available drop-down list on which execution is required as a part of this Agent configuration.
  • Choose the browser from the available drop-down list on which execution is required as a part of this Agent configuration:

    Note: The Microsoft Edge Legacy is replaced with the Microsoft Edge.
  • The browser version can be specified in case an automation flow has to be executed on a specific browser version. However, in case version info is not available, “latest” should be chosen as the option.
  • Choose the wanted screen resolution used when executing automation flows on the Sauce Lab machine.
  • The 'Description' field is optional and can be used for keeping some notes/description about the Agent.

After specifying all values, test the connection by clicking ‘Test connection’. If the Agent is set up correctly, Leapwork will show a ‘Successfully connected’ message in green.

Web Only – Browser Stack

BrowserStack is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems and mobile devices, without requiring users to install virtual machines, devices, or emulators. BrowserStack and Sauce Labs provide the same services - the difference is in the available amount of devices and configurations.

VIDEO TUTORIAL: Learn how to set up an Agent for BrowserStack.

To create an Agent that points to BrowserStack, please create a BrowserStack account in advance.

Select the Agent type as 'Web Only – Browser Stack' from the drop-down and then provide the values for the below fields:

  • Specify a unique title for the Agent, e.g. “BrowserStack_Win10_Chrome”.
  • A BrowserStack account Username must be provided.
  • A BrowserStack account Access Key must be specified.
  • Choose the desired “Platform & OS” from the available drop-down list.
  • For the specified platform, choose the platform version from the available drop-down list on which execution is required as a part of this Agent configuration.
  • Choose the browser from the available drop-down list on which execution is required as a part of this Agent configuration.

    Note: The Microsoft Edge Legacy is replaced with the Microsoft Edge.
  • The browser version can be specified in case a flow has to be executed on a specific browser version. However, in case version info is not available, “latest” should be chosen as the option.
  • Leave this unchecked for hosted websites. The Local Identifier should be enabled in case a local hosted site is to be tested. Running BrowerStack Local allows you to test your private and internal servers, alongside public URLs, using the BrowserStack cloud, which has support for firewalls, proxies and Active Directory.
  • Choose the wanted screen resolution used when executing automation flows on the BrowserStack machine.
  • The 'Description' field is optional and can be used for keeping some notes/description about the Agent.

After specifying all values, test the connection by clicking ‘Test connection’. If the Agent is set up correctly, Leapwork will show a ‘Successfully connected’ message in green.

Web Only – GridLastic

Gridlastic is a cloud-based cross-browser testing tool that enables developers to test their websites across various browsers on different operating systems without requiring users to install virtual machines, devices and operating systems. 

To create an Agent that points to Gridlastic, please create a Gridlastic account in advance.

Select the Agent type* as Web Only – Gridlastic from the drop-down and then provide the values for the below fields:

  • Specify a unique title for the Agent, e.g. “Gridlastic_Win10_Chrome”.
  • Provide your Gridlastic Subdomain.
  • Specify the Gridlastic Port - the default is 80.
  • A Hub Username must be provided.
  • A Hub Password must be specified.
  • Choose the desired “Platform & OS” from the available list of the drop-down.
  • For the specified platform, choose the platform version from the available drop-down list on which testing is required as a part of this Agent configuration.
  • Choose the browser from the available drop-down list on which testing is required as a part of this Agent configuration.

    Note: The Microsoft Edge Legacy is replaced with the Microsoft Edge.
  • The browser version can be specified in case a test has to be executed on a specific browser version. However, if version information is not available, “latest” should be chosen as the option.
  • Choose the wanted screen resolution used when executing automation flows on the Gridlastic machine.
  • The description is an optional field which can be used for keeping some notes/description about the Agent.

After specifying all values, test the connection by clicking ‘Test connection’. If the Agent is set up correctly, Leapwork will show ‘Successfully connected’ message in green.

Web Only – LambdaTest

LambdaTest is a cloud-based cross browser testing tool that allows you to perform testing for web applications across more than 2000 browsers, operating systems, and devices. You can perform both manual and automated cross browser testing using LambdaTest.

For example, you can test your web application across the most recognized web browsers, such as Chrome, Safari, Firefox, Edge, Internet Explorer, Opera, and Yandex.

Select the Agent type* as 'Web Only – LambdaTest' from the drop-down and then provide the values for below fields:

  • Specify a unique title for the Agent, e.g. “LambdaTest_Win10_Chrome”.
  • Specify the IP address, machine name, or DNS name for the Hub of LambdaTest.
  • Specify the LambdaTest Port - the default is 80.
  • A LambdaTest account Username must be provided.
  • A LambdaTest account Access Key must be specified.
  • Choose the desired “Platform & OS” from the available list in the drop-down.
  • For the specified platform, choose the platform version from the available drop-down list on which testing is required as a part of this Agent configuration.
  • Choose the browser from the available drop-down list on which testing is required as a part of this Agent configuration.
  • The browser version can be specified in case a test has to be executed on a specific browser version. However, if version information is not available, “latest” should be chosen as the option.
  • Choose the wanted screen resolution to use when executing automation flows on the LambdaTest machine.

    Note: The Microsoft Edge Legacy is replaced with the Microsoft Edge.
  • The description is an optional field which can be used to keep some notes/description about the Agent.

After specifying all values, test the connection by clicking ‘Test connection’. If the Agent is set up correctly, Leapwork will show a ‘Successfully connected’ message in green.

Using Agents

Agents can be used in two ways when working with the Leapwork Automation Platform: In schedules and in preview runs in the design phase. Find out more here:

Using configured Agents in schedules.

Using configured Agents in preview runs.