5. Agents

LEAPWORK supports the execution of automation flows on remote computers. 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/computers/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 five different types of Agents, each offering different capabilities:

  • Remote Agent
  • Sauce Labs
  • Browser Stack
  • Selenium Grid
  • Gridlastic

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 LEAPWORK Studio then follow these steps:

  1. In LEAPWORK Studio, navigate to the 'Agents' section.
  2. Click on the 'New' button from the Agents menu.
  3. Choose the required Agent type [detailed below].
    Create_Agent-1

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 the Remote Agent, select 'Remote Agent' from the ‘Agent type’ drop-down. A pop-up will appear as below which would require form filling.

image-990048

  1. Specify a unique title for the Agent, e.g. “Local Agent”, “Remote Agent” or simply “Agent” etc.
  2. Description is an optional field which can be used for keeping some notes/a description about the Agent.
  3. Agent type (pre-populated as Remote (Agent)), is the required type of Agent.
  4. If the Agent is installed on the same computer as LEAPWORK Studio, the hostname can be specified as “localhost”. In other cases, specify the IP address, computer name, or DNS name for the remote computer.
  5. The port should match the port specified as part of the LEAPWORK Agent installation on the remote computer. The default port is 6777 but can be changed if needed.
  6. There are three types of authentication to select from:
    1. Windows login is used to authenticate connections to the Agent with a Windows username and password.
    2. Windows login - auto is used to automatically login to the Agent with a predefined Windows username and password on each connection.
    3. Password is used to login to Windows using a simple password. This is deprecated and will be removed from LEAPWORK in a future release.
  7. Choose the wanted screen resolution used when executing automation flows on the remote computer. The list contains the available resolutions on the remote computer.
  8. 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.
  9. Lock the session after disconnecting from 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 Remote Agent is ready to be used.

More information about remote environments.

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 environment 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:

image-990052

  1. Specify a unique title for the environment, e.g. “Saucelab_WIN_FF”.
  2. 'Description' is an optional field which can be used for keeping some notes/ a description about the environment.
  3. Agent type (pre-populated as Web Only - Sauce Labs), is the required type of agent.
  4. A Sauce Labs account Username must be provided.
  5. A Sauce Labs account Access Key must be specified.
  6. Choose the desired “Platform & OS” from the available list in the drop-down.
  7. 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.
  8. Choose the browser from the available drop-down list on which execution is required as a part of this Agent configuration.
  9. The browser version can be specified in case an automation flow has to be executed on a specific one.
    However, in case the version info is not available, “latest” should be chosen as the option.
  10. Choose the wanted screen resolution used when executing automation flows on the Sauce Lab machine.

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.

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 lies in the amount of devices and configurations available.

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

To create an Agent that points to BrowserStack, please set up 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:

image-990053

  1. Specify a unique title for the environment, e.g “BrowserStack_Win10_Chrome”.
  2. 'Description' is an optional field that can be used to keep some notes/ a description about the Agent.
  3. Agent type (pre-populated as 'Web Only - Browser Stack'), is the required type of Agent.
  4. The BrowserStack account Username must be provided.
  5. The BrowserStack account Access Key must be specified.
  6. Choose the desired “Platform & OS” from the available list in the drop-down.
  7. 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.
  8. Choose the browser from the available drop-down list on which execution is required as a part of this Agent configuration.
  9. The browser version can be specified in case a flow has to be executed on a specific one. However, in case the version info is not available, “latest” should be chosen as the option.
  10. Leave this unchecked for hosted websites. 'Local Identifier' should be enabled in case a locally hosted site is to be tested. Running BrowserStack Local allows you to test your private and internal servers, alongside public URLs, using the BrowserStack cloud, which has support for Firewalls, Proxies and the Active Directory.
  11. Choose the wanted screen resolution used when executing automation flows on the BrowserStack machine.

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.

Web Only – Selenium Grid

A Selenium Grid is a Selenium proxy with several Selenium Agent machines. This means when an automation flow runs in the LEAPWORK Controller, it will send instructions to 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:

image-990051

  1. Specify a unique title for the environment, e.g. “Selenium Grid”.
  2. 'Description' is an optional field which can be used for keeping some notes/ a description about the environment.
  3. Agent type (pre-populated as 'Web Only - Selenium Grid'), is the required type of Agent.
  4. Specify the IP address, machine name, or DNS name for the Hub of Selenium Grid.
  5. The port should match the port specified as part of the Selenium Grid configuration. The default port is 4444 but can be changed.
  6. “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.
  7. Choose the browser from the available drop-down list on which execution is required as a part of this Agent configuration.
  8. the browser version can be specified in case a flow has to be executed on a specific one. However, to test a specific version, it should be available on Selenium Grid. Otherwise, leave the field blank to run tests on any available version of the specified browser.
  9. The user profile is utilized in case certain plug-ins, extensions, bookmarks etc. are required whilst initializing a test case. Users can create custom profiles on Chrome and Firefox browsers, which are saved on the local path of a machine. Refer here for detailed information on the creation/usage of profiles.

    Provide the path of the profile from the root directory.

    e.g. C:\Users\<user>\AppData\Roaming\Mozilla\Firefox\Profiles\<profile>\

  10. Choose the wanted browser resolution used when executing automation flows.

More general information about Selenium Grid.

Web Only – Gridlastic

Gridlastic is a cloud-based service provider for Selenium Grid that provides a low-cost, high-speed, maintenance-free Selenium Grid testing infrastructure. Gridlastic provides each customer with their own Selenium Grid in the cloud, with specific needs in a geographical location of your choice for best speed and economy. 

Users can either spend the time and effort to create and maintain their own testing infrastructure or use a service like Gridlastic, which is ready to go and maintenance-free.

VIDEO TUTORIAL: Gridlastic

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

image-990055

  1. Specify a unique title for the Agent, e.g. “Gridlastic_Win10_Chrome”.
  2. 'Description' is an optional field which can be used for keeping some notes/ a description about the agent.
  3. The Agent type (pre-populated as 'Web Only - Gridlastic'), is the required type of Agent.
  4. Specify the Subdomain for the Gridlastic account.
  5. The port should match the port specified as part of the Gridlastic configuration. The default port is 80 but can be changed.
  6. The Gridlastic account Hub Username must be provided.
  7. The Gridlastic account Hub Password must be specified.
  8. Choose the desired “Platform & OS” from the available list in the drop-down.
  9. For the specified platform, choose the platform version from the available drop-down list on which execution is required as part of the Agent configuration.
  10. Choose the browser from the available drop-down list on which execution is required as a part of this agent configuration.
  11. The browser version can be specified in case a flow has to be executed on a specific one. However, in case the version info is not available, “latest” should be chosen as the option.
  12. Choose the wanted browser resolution used when executing automation flows.

More general information about Gridlastic.

Using the 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:

Using configured agents in schedules.

Using configured agents in preview runs.