Chrome Flags Reference

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

--profile-directory

What does --profile-directory do?

Selects directory of profile to associate with the first browser launched.

Usage

CLILaunch Chrome with --profile-directory using CLI

chrome --profile-directory

PuppeteerLaunch Chrome with --profile-directory using Puppeteer

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

PlaywrightLaunch Chrome with --profile-directory using Playwright

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

SeleniumLaunch Chrome with --profile-directory using Selenium

from selenium import webdriver

options = webdriver.ChromeOptions()
options.add_argument('--profile-directory')

driver = webdriver.Chrome(options=options)