Skip to main content
chrome_policy is an optional object that applies Chrome enterprise policies to a browser. It works on both individual on-demand browsers (browsers.create()) and browser pools, where it applies to every browser in the pool. Use it to control startup behavior, default homepages, bookmarks, and other browser-level settings. Keys are Chrome policy names and values are the corresponding settings. The same policies and value types apply on both paths. Kernel-managed policies (extensions, proxy, and CDP/automation) are rejected, and the serialized payload is capped at 5 MiB.

Setting chrome policies on a pool

Pass a chrome_policy object when creating or updating a pool.

Updating policies on an existing pool

You can update chrome_policy on an existing pool. Pass discard_all_idle: true to immediately replace all idle browsers with the new policy configuration.

Example policies

The example above demonstrates setting a default homepage and managed bookmarks. Here’s what each policy does:

Common use cases

The examples below use browsers.create(), but the same policies apply when set on a pool.

Allow pop-ups

Chrome’s default blocks pop-ups, which breaks sites that open download dialogs or OAuth windows in a new window. Set DefaultPopupsSetting to 1 to allow them (2 blocks).

Control file download behavior

When automating file downloads that trigger permission prompts, combine DefaultPopupsSetting: 1 with DownloadRestrictions: 0 to allow all downloads.

Block DevTools and page source

DevTools hands anyone who can reach a browser a console on the page, plus network logs, cookies, and local storage. When you expose a session through live view, or run agent code you don’t fully trust, block the URLs DevTools loads from:

Available policies

Any policy listed in the Chrome Enterprise policy documentation can be used in the chrome_policy object. Refer to the official docs for the full list of supported policy names, types, and values.