Automate Chrome, Edge, and Firefox with the Application Modeller
A dedicated spy mode is available in the Application Modeller for interacting with Chrome, Edge, and Firefox.
- In the Application Modeller wizard, enter a name for the application model and click Next.
Select the Browser-based Application (Chrome, Firefox or Edge Chromium) option. You can then choose to continue using a browser that is already running or a browser launched from an executable.
- Continue through the wizard, completing the following fields:
Target page title – When configuring the Application Modeller using a browser that is already running, the window title can be specified. This ensures that the correct tab or window is identified when attaching to the browser. The visible window title is sometimes appended with further text that is not visible to users. Blue Prism adds a * wildcard at the end of the entered text to ensure that the window can be correctly identified. If the window title is not found for attaching, Blue Prism uses the executable to open Chrome, Edge, or Firefox. If the executable path is left blank, an error occurs if Blue Prism fails to attach.
This option is only available when modelling a browser that is running.
- Executable path – The location of the Chrome, Edge, or Firefox executable required by Blue Prism to open the application. This must be the full path, including the file type.
Start page URL – The address of the browser application or web page to be spied. Several URLs can be added, separated by a space. Command line parameters can be appended to a URL, also separated by a space.
If a URL is not entered, the browser opens the home page set on the machine when using the fixed browser extension port. When using an ephemeral port, the browser opens an about:blank URL and the user must enter a valid URL.
- Application manager mode – The browser extension is only compatible with the Embedded (Default) Application Modeller mode when launching or attaching to Chrome, Edge, or Firefox.
A list of web page attributes and their descriptions for Chrome, Edge, and Firefox automation is available
Browser automation via ephemeral ports versus fixed ports
The browser automation capabilities are dependent on whether the communication is established via a fixed browser port (31924) or a port dynamically selected from the ephemeral range.
Multiple instances of Blue Prism can launch multiple browser windows.
Multiple browser windows can be spied on the same device without conflict.
Only one instance of Blue Prism can launch a browser at any one time.
A single instance can launch multiple browser windows via separate objects but when an action is performed it is done against all web pages. For example, if a Terminate action is performed, all the connected browsers would close.
A tracking ID can be used to restrict actions to specific browsers when automating multiple browsers from one or more instances of Blue Prism.
A tracking ID can only be used in environments configured to use ephemeral ports. An error message displays if the user attempts to use it in environments configured to use a fixed port.
Browser automation in environments configured to use ephemeral ports
In environments configured to use ephemeral ports, you can open multiple instances of Blue Prism and spy multiple browser instances on the same device without conflict. If a user has two or more separate instances of Blue Prism on the same Windows environment, they can launch a browser from each Blue Prism instance and only spy the browsers launched by a particular instance.
A unique Tracking ID field can be used in the input or output parameters of various stages to restrict spying to a specific browser.
In the example below, when launching a browser instance, a tracking ID can be applied as an output parameter in the Navigate stage and stored in a text data item.
When detaching or terminating a browser instance, a tracking ID can be applied as an input parameter in the Navigate stage and only that instance of the browser will be detached/terminated.
The tracking ID can be used in Read, Write, and Wait stages to restrict Blue Prism to only interact with the browser instance that was created in the Launch action matching the tracking ID. This is useful if you have a process that needs to interact with two instances of the same Single Page Application (SPA), as controls in the first browser instance will also appear on the second instance of the browser resulting in spying errors. If using a tracking ID, only the instance of the browser you want to interact with will respond.