BrowserAutomationPlugin is a custom user plugin for the Now RPA platform by ServiceNow. It adds powerful browser automation capabilities to your RPA projects, allowing you to interact with web applications seamlessly.
This plugin provides a wide range of actions for browser automation, including navigation, element interaction, JavaScript execution, and more. It supports both Chrome and Edge browsers and can be easily integrated into your Now RPA projects.
Demo.Browser.Automation.mp4
Before you can use the BrowserAutomationPlugin in your Now RPA project, you need to set up the user plugin folder:
- Locate your RPA Desktop Design Studio automation project folder.
- Create a new folder named
UserPlugins
in this directory. - Inside the
UserPlugins
folder, create another folder with a name for your plugin (e.g., "BrowserAutomationPlugin"). - Place the plugin .dll files and selenium manager in this folder.
To add the plugin to your project:
- In the RPA Desktop Design Studio, open your project.
- In the Project Explorer pane, right-click User Plugins and select Add User Plugin.
- In the Available User Plugins dialog box, select
BrowserAutomationPlugin
. - Click OK.
The plugin will now appear in the Toolbox pane, ready for use in your automation workflows.
- Use appropriate selectors (preferably CSS or ID) for reliable element identification.
- Set reasonable timeouts based on your application's performance.
- Use headless mode for faster execution when GUI is not required.
- Leverage JavaScript interaction mode for complex scenarios or when simulated interactions are unreliable.
- Always close the browser session when finished to free up resources.
The plugin supports various element search techniques:
- CSS Selector:
Example:
#login-button
(selects element with id "login-button") - XPath:
Example:
//button[@type='submit']
(selects all submit buttons) - Element ID:
Example:
username
(selects element with id "username") - Tag Name:
Example:
input
(selects all input elements) - JavaScript:
Example:
document.querySelector('.submit-btn')
(selects first element with class "submit-btn")
Before using any other actions, it's crucial to start a session. The BrowserConnection
object returned by Start Session
is required for all other actions.
Initializes a new browser session.
- Inputs:
browserType
:BrowserType.Chrome
(default) orBrowserType.Edge
headless
(optional):false
(default) ortrue
for headless modeprofilePath
(optional): String path to custom user profilejsLibrary
(optional): String containing custom JavaScript librariesdriverPath
(optional): String path to custom WebDriverarguments
(optional): List of additional browser argumentsdisposeOption
:DisposeOption.AutoDisposeOn
(default) orDisposeOption.AutoDisposeOff
- Output:
BrowserConnection
object
Closes the browser session.
- Input:
BrowserConnection
object - Output: None
Best Practice: Always close your session explicitly using Close Session
or use AutoDisposeOn
to ensure proper resource management.