async function installConsoleListener(inspectorSession, logs) {
  inspectorSession.on('Log.entryAdded', ({entry}) => {
    if (entry.level === 'verbose') return;
    logs.push(`LOG[${entry.level}]: ${entry.text}\n`);
  });
  inspectorSession.on('Runtime.exceptionThrown', ({exceptionDetails}) => {
    const text = exceptionDetails.exception?.description || exceptionDetails.text;
    logs.push(`EXCEPTION: ${text}\n`);
  });
  await inspectorSession.send('Log.enable');
}
@param {puppeteer.CDPSession} inspectorSession
@param {string[]} logs