UiPath Studio

Configuration Steps

Each web browser uses its own Webdriver protocol. As such, when you plan your automation projects via the Webdriver protocol, you need to carefully install and configure the corresponding protocol for the browser you want to use. For the time being, only Chrome and Firefox can be automated via the Webdriver protocol. Below you find the requirements and steps to take in order to use the Webdriver protocol:

Web Browser
Webdriver Requirements

Chrome

  • ChromeDriver
  • Google Chrome is updated automatically and ChromeDriver builds are released often. Make sure that the ChromeDriver version always matches the version of Google Chrome.

Firefox

  • geckodriver
  • Builds for geckodriver are rarely released. It is recommended to use the latest version in your automation projects.

Installing the Webdriver Protocol

  1. Download the Webdriver corresponding to the browser you want to use.
  2. Install the downloaded Webdriver in a location of your choice, such as C:\webdriver\Chrome.
  3. In the Windows Start Menu, find and open the Edit the system environment variables entry. The System Properties window is displayed.
  4. Click the Environment Variables... button at the bottom of the page. The Environment Variables window is displayed.
  5. Select the Path variable either from the User variables or System variables section and click the Edit... button. The Edit environment variable window is displayed.
  6. Click the Browse... button and select the folder where you installed the corresponding Webdriver executable. In our case this is C:\webdriver\Chrome.
  7. Click the OK button on all previously opened windows to save the changes. The Webdriver protocol is now installed.
  8. Restart the Robot Service for the changes to take effect. You are now ready to use the Webdriver protocol in your automation projects.

Opening a Browser

Interacting with a browser via the Webdriver protocol is only possible inside an Open Browser container. After you add an Open Browser activity, a couple of properties need to be configured, as follows:

Visual Browser Automation

  • CommunicationMethod - WebDriver
  • BrowserType - Chrome or Firefox

Headless Browser Automation

  • CommunicationMethod - WebDriver
  • BrowserType - Chrome or Firefox
  • Hidden - True

Please note that, for headless browser automation, activities relying on hardware events (such as Click or Type Into) must be configured to use the SimulateClick or SimulateType properties.

Closing a Browser

Using the Close Tab Activity

If your automation process is only done in a single browser session, it is recommended to use the Close Tab activity. All you need to do is place it inside the Open Browser container which uses the Webdriver protocol at the end of the sequence. The corresponding webdriver application and processes are closed.

Using the Close Application Activity

In this case, you need to make sure that the selector for the Close Application activity uses a <HTML> tag. This way the corresponding webdriver process is also closed along with the browser session.

Below are a couple of valid <HTML> tags you can use with the Close Application activity:

  • <html app='firefox.exe' /> - to close Firefox
  • <html app='chrome.exe' /> - to close Chrome

You might, however, want to tweak the selector for the Close Application activity to specifically target the browser session you are automating, because this method closes the first browser it finds which matches the selector.

Note:

If the selector for the Close Application activity uses a <WND> tag, the browser session is still closed, but the webdriver process remains active.

Updated about a month ago


Configuration Steps


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.