run puppeteer on already installed chrome on macos
You can set executablePath: '/Applications/Google Chrome.app/'
...
You can browse chrome://version/
in chrome, and find executableFilePath
(maybe it's not this name, my chrome is not english version), use this.
See Screenshot Below
For me it worked when I set executablePath: '/Applications/Google Chrome.app/Contents/MacOS/Google Chrome'
Regarding your first question, Puppeteer docs indicate that it could work with an installed version of Chromium -- NOT Chrome.
To use an installed version:
- set the environment variable PUPPETEER_SKIP_CHROMIUM_DOWNLOAD (https://github.com/GoogleChrome/puppeteer/blob/master/docs/api.md#environment-variables)
- use the executablePath, as you have already pointed out.
Regarding your second question, use --window-size. For example: "--window-size=800,600"
Please be aware that if you have opened a browser window with an explicitly set window-size, then that size will be used for all future windows (ignoring any size you specify for the future windows). For a new window-size to be effective, you must close all previously opened windows.