ConsoleMessage objects are dispatched by page via the 'console' event.
The message arguments.
The location the message originated from
The message text.
returns the object as JSON, so you don't need to call methods to obtain property values.
page.on("console",(details)=>{ console.warn(details.toJson()); });
ConsoleMessage objects are dispatched by page via the 'console' event.