Help Centre › Building Processes
This article describes the RPA Browser functionality to block network requests matching URL patterns.
For a full list of available functions, please read BROWSER functions.
Description
The BROWSER Block URLs function allows you to block network requests matching specified URL patterns using the Chrome DevTools Protocol (CDP). This is useful for blocking ads, trackers, analytics scripts, or any unwanted resources to speed up page loads or prevent interference with automation.
Setting it up
To use the BROWSER Block URLs function, follow these instructions:
{{popups:rpas/add:action=browser-block-urls}}
Once on a process map:
- Navigate to the process where you would like to add the BROWSER Block URLs 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 Block URLs option
- Click "Add" once you are done
Input parameters
| Parameter | Required | Type | Default | Description |
|---|---|---|---|---|
| URL patterns | Yes | Text | – | Comma-separated URL patterns to block (e.g. *.ads.com*,*.tracker.io*). |
| Variable | No | Text | blocked_urls | Variable name to store the list of blocked patterns. |
Output variables
| Variable | Type | Description |
|---|---|---|
| {blocked_urls} | List | List of URL patterns currently being blocked. |
Errors
| Error | Description |
|---|---|
| Browser not open | No browser session is active. |
Tips
- Use wildcard patterns like *.ads.com* to match subdomains and paths.
- Block analytics and tracking scripts to speed up automation on heavy pages.
- Use BROWSER Unblock URLs to remove all blocks when no longer needed.