Search

How to get XPath using the Infor RPA Recorder and Inspector?

Overview

This tutorial will help you learn how to get XPaths of web elements using the Infor RPA Recorder and Inspector web extension.

What is XPath?

XPath is a Selenium technique to navigate through a page’s HTML structure. It enables us to navigate any document’s XML structure, which can be used on both HTML and XML documents.

XPath is used in almost all web activities. It is used whenever we have to refer to any element on a webpage. For example, if we have to click on a link on a webpage, we could pass the XPath of that to the Click activity.


Components

  • RPA Management
  • RPA Recorder

Requirements

  • Before starting on using the Web activities, we need to install the Infor RPA Recorder and Inspector web extension from the Chrome Store.
    • Go to Chrome Store
    • Search “Infor RPA Recorder and Inspector”. The extension will appear.
    • Add the extension to your preferred browser.

Tutorial

Difficulty: Easy
Estimated completion time: 15 Minutes

  1. Open the Web browser of your choice. Go to the site that you need to be automating. For example, it could be a tenant that we are trying to log into.
  2. Click on the Extension icon on the top right corner. On clicking, a list of active extensions appears, click on the Infor RPA Recorder and Inspector to launch the extension. Extension icon can be seen highlighted.

3. On launching, you can see the application has two tabs, Inspector and Recorder. We will stick to the Inspector tab for this tutorial. You can also the see the site the Inspector is currently referring to.

4. Click on the Arrow with the dotted lines around it to get into Inspector more. Now anything you click on the web page will not be registered as click but would rather generate the XPath of that element.

5. In this example we are inspecting the login page of a tenant. After starting the inspection by clicking on the arrow, you would see all the clickable fields highlighted, to indicate that they are clickable fields. In this case, the “Username”, “Password”, “Sign in” button, “Reset/Forgot Password” are all clickable fields that could be used in automation. For logging in though, we only need the username, password, and the Sign in button. When all these three fields are clicked, the XPaths generated can be seen on the Inspector.

6. We now have the XPaths of these elements. They all have a “cross” and a “copy” icon with it. The copy icon can be used to copy the XPath and use it in the RPA Studio. The XPaths of the username and pass fields can be used with the “Set Text” activity, which would allow you to set the required texts in those fields. The XPath of the Sign in button can be used in the “Click” activity to click on the Sign in button.