Web automation can be very helpful in cases like filling up a lengthy form or scraping data from hundreds of pages. With the use of the right automation tools, it is possible to reduce manual effort and give employees their valuable time back.
MuleSoft Recorder provides the ability to instantly record and capture your business processes across desktop and web applications. Additionally, MuleSoft RPA Builder also provides Web automation capabilities to automate web applications such as keystrokes, click paths, and data scraping in a more granular fashion. To help you understand, we’ll look at the various features offered by MuleSoft RPA Builder. As an example, let’ set up a simple automation that searches for a text in Google.
A web session is a series of related requests that come from the same client, in a specific period. Using the Web Session action steps, it is possible to open and close the browser window in which all the Web Automation elements contained therein interact. RPA Builder provides Web Session action steps for MS Edge, Firefox, and Chrome.
The Web Session wizard has a bunch of properties including the initial URL for the session, Window state, mouse position, and the option to reuse the Web Session Id. This provides the ability to maintain the session state and perform the desired actions as if they were being performed by a human user. This can be done by defining the web session ID in the Workflow variables ahead of time.
Once the Web Session ID is created, you can link the session easily using the dropdown menu in the Web Session Wizard.
When the Web Session ID is not linked, the browser is automatically closed when the session is closed. When the Session ID is linked, the browser remains open until the end of the workflow. Alternatively, you can also use the Close Session action step to close the session.
Web Element Interactions
RPA Builder provides a variety of action steps to interact with the web elements, including Select, Keystrokes, Click, Clear, etc.
Keystrokes to Web Element
This option can be used to enter alphanumeric characters into fields on a website or within a web application. The work area can be defined using XPath expressions.
Notice that input text can be static or can be templated from variables within the workflow.
This option allows you to submit a form on a webpage. It will work on any field contained within a form and submit the whole form. We can define the button using an XPath expression.
The Browser Wizard is part of Web Automation Action Step wizards. It behaves like a normal browser and enables you to select additional elements of a website and determine their Xpath. The browser wizard can be activated from within any of the Web Element action steps.
Clicking the Open Browser Wizard button in one of the wizards opens a new window that functions as a browser and loads the URL that is defined as the initial URL for the enclosing Web Session. The Browser Wizard allows you to capture the XPath on the Web elements, by selecting the element (hover + F2).
Web Automation in action
Now, let’s look at the end-to-end implementation of the workflow:
Web automation can greatly reduce manual effort and time spent on repetitive and boring tasks like data entry or extraction. MuleSoft RPA provides an entire toolbox of capabilities ready-to-use to Web automation. With the right web automation, it’s possible to reduce the time and effort spent on repetitive tasks for better operational efficiency.