Connecting Browsers in Puppeteer Connecting Browsers in Puppeteer node.js node.js

Connecting Browsers in Puppeteer


The answer is Yes and No.

You can connect to an existing using the connect function:

const browserURL = 'http://127.0.0.1:21222';const browser = await puppeteer.connect({browserURL});

But, if you want to use those 2 lines you need to launch Chrome with the "--remote-debugging-port=21222 argument.