Page 1 of 1

Returning Objects from ConsoleMessage

PostPosted: Wed Jul 20, 2022 1:54 am
by Sagan
Hey Everyone,

I'm writing an application that's currently parsing console messages looking for certain events being passed to the browser.
When observing the console in Chrome, Edge, Firefox etc... some of the entries are returning values that can be expanded (appears to be a JSON object of some type):

Image

However CEF only returns a String in the ConsoleMessage event. Those JSON entries just show up as:

Code: Select all
scripter: WS Body:  [object Object]


Is there any way to get more detailed information from this kind of response via any other kind of output?

Re: Returning Objects from ConsoleMessage

PostPosted: Wed Jul 20, 2022 10:00 am
by magreenblatt
Are you in control of what gets logged? If so, write the event contents as JSON or similar using console.log().

Re: Returning Objects from ConsoleMessage

PostPosted: Wed Jul 20, 2022 6:46 pm
by Sagan
magreenblatt wrote:Are you in control of what gets logged? If so, write the event contents as JSON or similar using console.log().


Nah unfortunately I'm not in control of this. It's an external service.

I have a feeling I'm going to be out of luck with this one, unless I can inject some kind of JavaScript to collect events. I'm not a highly proficient web developer unfortunately, not my usual area of expertise.

Edit: I'm starting to look into the DevToolsClient, although documentation seems a little light. I'm hoping there's some way to capture that information inside there somewhere.