Help Centre › Building Processes
This article describes the RPA Browser functionality to capture network requests matching a URL pattern.
For a full list of available functions, please read BROWSER functions.
Description
The BROWSER Capture network requests function starts intercepting network requests and responses matching a regex URL pattern. It captures both fetch and XHR calls, storing them for later retrieval with Get captured requests. This is useful for monitoring API calls made by a web application during automation.
Setting it up
To use the BROWSER Capture network requests function, follow these instructions:
{{popups:rpas/add:action=browser-capture-requests}}
Once on a process map:
- Navigate to the process where you would like to add the BROWSER Capture network requests function
- Click on the green button's drop-down (right side of the green button labelled "Process")
- On the menu that appears, click on the "+ Activity" item
- From here you can select the BROWSER Capture network requests option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| URL pattern | Yes | Text | – | Regex pattern to match request URLs (e.g. api/v1/users or .*\.json$). |
| Variable | No | Text | captured_requests | Variable name to store captured requests. |
Output variables
| Variable | Type | Description |
|---|---|---|
| {captured_requests} | List | List of captured request objects (initially empty, populated as requests occur). |
Errors
| Error | Description |
|---|---|
| Browser not open | No browser session is active. |
| Invalid pattern | The regex pattern is invalid. |
Tips
- Start capturing before the action that triggers the requests you want to monitor.
- Use Get captured requests to retrieve the collected data after the relevant actions complete.
- Use specific patterns to avoid capturing unrelated traffic.