5. Environments

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, Environments are the available machines/devices on which the automation flows can be executed. The defined environments can be used when setting up [Schedules] or when running automation flows in preview mode.

LEAPWORK comes with four different types of Environments each offering different capabilities:

  • Remote (Agent) – LEAPWORK Agent
  • Web Only – Selenium Grid
  • Web Only – Sauce Labs
  • Web Only – Browser Stack

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

Creating an Environment

To configure a LEAPWORK Environment, launch LEAPWORK studio and follow these steps:

  1. In LEAPWORK Studio, Navigate to the 'Environments' section.
  2. Click on the 'New' button from the Environments menu.
    environments-2

Environment Types

Remote Agent

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

To setup an environment as Remote (Agent) select Remote (Agent) from the ‘Environment type’ drop-down and fill in the form:

remote agent

  1. Specify a unique title for the environment, e.g. “Local Agent”, “Remote Agent” or simply “Agent” etc.
  2. If the Agent is installed on the same machine as 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..
  3. The port should match the port specified as part of the LEAPWORK Agent installation on the remote machine. The default port is 6777, but can be changed if needed.
  4. If a password was specified as part of the agent installation, enter this password. Otherwise leave it blank.
  5. Choose the wanted screen resolution used when executing automation flows on the remote machine. The list contains the available resolutions on the remote machine.
  6. The primary display (denoted as Display 1) is the default Display; however, in case of multiple displays a particular display for flow execution should be selected.
  7. Description is an optional field which can be used for keeping some notes/description about the environment.

After specifying all values, test the environment by clicking ‘Test connection’. If the environment 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 environment is ready to be used.

More information about remote environments.

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 Environment type 'Web Only – Selenium Grid' from the drop-down and then provide the value for the fields below:

selenium grid

  1. Specify a unique title for the environment, e.g. “Selenium Grid”.
  2. Specify the IP address, machine name, or DNS name for the Hub of Selenium Grid.
  3. The port should match the port specified as part of the Selenium Grid configuration. The default port is 4444, but can be changed.
  4. “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.
  5. Choose the Browser from the available drop-down list on which execution is required as a part of this environment configuration.
  6. 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.
  7. Choose the wanted Browser resolution used when executing automation flows.
  8. Description is an optional field which can be used for keeping some notes/description about the environment.

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 environment for Sauce Labs.

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

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

sauce labs

  1. Specify a unique title for the environment, e.g. “Saucelab_WIN_FF”.
  2. Sauce Labs account Username must be provided.
  3. Sauce Labs account Access Key must be specified.
  4. Choose the desired “Platform & OS” from the available list of drop-down.
  5. For the specified Platform, choose the platform version from the available drop-down list on which execution is required as a part of this environment configuration.
  6. Choose the Browser from the available drop-down list on which execution is required as a part of this environment configuration.
  7. 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.
  8. Choose the wanted screen resolution used when executing automation flows on the Sauce Lab machine.
  9. Description is an optional field which can be used for keeping some notes/description about the environment.

After specifying all values, test connection by clicking ‘Test connection’. If the environment is set up correctly, LEAPWORK will show ‘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 are providing the same services, and the difference is in the available amount of devices and configurations.

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

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

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

browserstack

  1. Specify a unique title for the environment, e.g “BrowserStack_Win10_Chrome”.
  2. BrowserStack account Username must be provided.
  3. BrowserStack account Access Key must be specified.
  4. Choose the desired “Platform & OS” from the available list of drop-down.
  5. For the specified Platform, choose the platform version from the available drop-down list on which execution is required as a part of this environment configuration.
  6. Choose the Browser from the available drop-down list on which execution is required as a part of this environment configuration.
  7. 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.
  8. Leave this unchecked for hosted websites, 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.
  9. Choose the wanted screen resolution used when executing automation flows on the BrowserStack machine.
  10. Description is an optional field which can be used for keeping some notes/description about the environment.

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

Using the Environments

Environments 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 environments in schedules.

Using configured environments in preview runs.