◷ Reading Time: 8 minutes
Robotic Process Automation or RPA is an extension that enables FlexRule to provide RPA capabilities. RPA allows automation to occur within applications from a User Interface (UI) navigation and actions perspective (i.e. Mouse Clicks, Moves, or Keyboard keystrokes).
A simple example is a model that navigates to
reddit.com and scrapes the search results for
Below is an example of the reddit.com search scenario:
When an RPA automation model is required:
- Create a new document as a Generic Flow
- Use the toolbox to model your automation
- Use Element Inspector to get a page’s element information to address mouse or keyboard for taking an action
When the RPA Extension is installed, the Toolbox will be updated for Flow and Workflow models.
Navigating to Address
There are two activities that open a new browser:
- New Browser
- Navigate to
Both can be used to open a new browser and navigate to a specific address (URL).
When this command is used, it only opens a new browser and references a name for it. It does not navigate to a specific address unless it is connected to the Navigate To step.
When a New Browser is used, Copy Result To specifies the value that can be later used to reference that instance of the browser.
This activity can be used to redirect an existing browser instance to a specific address, or open a new browser instance and navigate to an address. The navigation address can be set by a Url property.
If Navigate To is reusing an existing open instance of a browser, Target Browser must be set to that instance. Otherwise, the New Browser section under Navigate To allows you to open a new browser instance.
Some of the commands from the RPA toolbox require page element information in order to take action:
- Find Element
- List Action
- Set Text
- Get Text
- Set Attribute
- Get Attribute
These actions can be Mouse or Keyboard actions. For example, typing a value in a Text, or clicking on a button.
Best Matching Attributes
Elements of a web page can be identified based on different matching methods (Lookup Key):
The best possible match is based on:
- CSS Selector
- and the rest…
Some commands can accept string values on their own (e.g., Navigate – which accepts a URL as a string and will navigate to a specific URL). Sometimes it is necessary to read those values rather than use static constant values. In such cases, those values (e.g., the URL of the Navigate command can be set to a parameter name or expression and then the type of value should be set to expression).
1. Select the (…) button to open the value editor.
2. Add the parameter name or expression value (e.g., siteAddress) and set the type or Expression
FlexRule RPA contains merged nodes to reduce the number of steps in a process flow and make it easier to understand.
To navigate to a web page, it is necessary to open a web browser first, and then navigate to the website. For instance, consider the scenario of navigating to Google using a Chrome web browser. The steps are as follows:
- Open Chrome web browser
- Navigate to Google
This process can be achieved in two ways:
Method 1: Using two tools for the two steps
- Open Chrome web browser using a New Browser tool: Create web1 browser instance.
- Navigate to Google using a Navigate To tool: Navigate to www.google.com using the created web1 browser instance
Method 2: Using one tool for the two steps
- Navigate to Google using a single Navigate To tool instance: Navigate to www.google.com by creating web1 browser instance
Method 2 is the merged node that allows you to execute two steps with one tool.
How to Inspect
Google Chrome Dev Tool is the best tool to inspect the elements of a web page.
Navigate to the page and right-click on the element you need to inspect
Development tool inspector appears and highlights the element HTML
Select the best matching attribute (i.e., name, id, etc.)
And choose it for Lookup Key property. In this example, we choose the Name attribute.
Add the Value of attribute to Search Value property. In this example, it is q
This sample project (RPA.zip) can be downloaded using the attachment at the end of the page. It contains all examples explained under each tool including the tutorials.