admin管理员组

文章数量:1391964

Is it somehow possible to attach puppeteer to a running Chrome instance (manually started browser) and then takeover control within a tab? I'm assuming that it's eventually related to start the Chrome browser using the --no-sandbox flag but don't know how to continue from there.

Thanks for any help

Is it somehow possible to attach puppeteer to a running Chrome instance (manually started browser) and then takeover control within a tab? I'm assuming that it's eventually related to start the Chrome browser using the --no-sandbox flag but don't know how to continue from there.

Thanks for any help

Share Improve this question edited Mar 2, 2019 at 4:52 vsemozhebuty 13.9k1 gold badge28 silver badges28 bronze badges asked Feb 28, 2019 at 9:35 BernieBernie 5,0555 gold badges43 silver badges73 bronze badges
Add a ment  | 

1 Answer 1

Reset to default 6

You can use puppeteer.connect(options) (see here):

const puppeteer = require('puppeteer');

const browserWSEndpoint = 'a browser websocket endpoint to connect to';
const browser = await puppeteer.connect({browserWSEndpoint});
//continue from here

本文标签: javascriptHow to quothook inquot puppeteer into a running Chrome instancetabStack Overflow