Chrome Flags Reference

Chrome command line switches and startup flags for automation, headless mode, and debugging.

--enforce

What does --enforce do?

No description available for this flag.

Usage

CLILaunch Chrome with --enforce using CLI

chrome --enforce

PuppeteerLaunch Chrome with --enforce using Puppeteer

const browser = await puppeteer.launch({
  args: ['--enforce']
});

PlaywrightLaunch Chrome with --enforce using Playwright

const browser = await chromium.launch({
  args: ['--enforce']
});

SeleniumLaunch Chrome with --enforce using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--enforce')

driver = webdriver.Chrome(options=options)