im trying to open multiple tabs in a single browser instance , after they\'re done i close the tabs and then re-opening those tabs every x seconds ... but i want to keep th
If you just close all tabs (or browser window) but browser process is still there (but no any window).
disconnected event will not be triggered.
disconnected
Then you can check whether all tabs are closed by:
if ((await browser.pages()).length === 0) { // no tabs opening, do stuff }