Chrome Flags Reference

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

--native-messaging-connect-id

What does --native-messaging-connect-id do?

If set when kNativeMessagingConnectHost and kNativeMessagingConnectExtension are specified, is reflected to the native messaging host as a command line parameter.

Usage

CLILaunch Chrome with --native-messaging-connect-id using CLI

chrome --native-messaging-connect-id

PuppeteerLaunch Chrome with --native-messaging-connect-id using Puppeteer

const browser = await puppeteer.launch({
  args: ['--native-messaging-connect-id']
});

PlaywrightLaunch Chrome with --native-messaging-connect-id using Playwright

const browser = await chromium.launch({
  args: ['--native-messaging-connect-id']
});

SeleniumLaunch Chrome with --native-messaging-connect-id using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--native-messaging-connect-id')

driver = webdriver.Chrome(options=options)