You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I was playing around with Puppeteer today and I found out that there is no way (that I know of) to run script like this:
const puppeteer = require('puppeteer');
puppeteer.connect({browserWSEndpoint: <endpoint>}).then(async browser => {
const page = await browser.currentPage();
// other actions that would manipulate the current page
browser.close();
});
The only way to get a Page instance seems to be browser.newPage() which is rather inconvenient if I want to run several test scripts that all connect to one browser instance.