Skip to content

Instantly share code, notes, and snippets.

@dmitriyzyuzin
Created February 3, 2021 11:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dmitriyzyuzin/9adf60f79c68e0ab79a640b66bba9838 to your computer and use it in GitHub Desktop.
Save dmitriyzyuzin/9adf60f79c68e0ab79a640b66bba9838 to your computer and use it in GitHub Desktop.
Run Puppeteer with your local chrome browser (not Chromium)

How to run puppeteer tests with your local Chrome browser

  1. Find browser's executable path:
    Go to chrome://version/ (inside Chrome browser) and find "Executable Path" variable ("/Applications/Google Chrome.app/Contents/MacOS/Google Chrome" in my case)
  2. Modify your script:
const browser = await puppeteer.launch({
    executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome',
    args: ['--disable-blink-features=AutomationControlled'],
    headless: false,
  });
  1. PROFIT
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment