BROWSER Block URLs function

Block network requests matching URL patterns via CDP.

Help CentreBuilding 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:

  1. Navigate to the process where you would like to add the BROWSER Block URLs function
  2. Click on the green button's drop-down (right side of the green button labelled "Process")
  3. On the menu that appears, click on the "+ Activity" item
  4. From here you can select the BROWSER Block URLs option
  5. Click "Add" once you are done

Input parameters

ParameterRequiredTypeDefaultDescription
URL patternsYesTextComma-separated URL patterns to block (e.g. *.ads.com*,*.tracker.io*).
VariableNoTextblocked_urlsVariable name to store the list of blocked patterns.

Output variables

VariableTypeDescription
{blocked_urls}ListList of URL patterns currently being blocked.

Errors

ErrorDescription
Browser not openNo 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.

Related functions

See it working on your own data

Everything documented here ships with the platform – try the document tools free, or go live in 7 days.