Serialize console arguments and send them to puppeteer. Unfortunately for
us the native serialization methods for JSHandle objects from puppeteer
are lossy. They turn Error objects into {} and null to undefined.
The passed "preview" object is incomplete and truncates all data for nested
objects or other complex values.
The only way to keep the data intact is to use a custom serialization format
and pass it around as a string.
Parameters
config: Config
page: Page
Returns Promise<void>
parseConsoleArg
parseConsoleArg(value: any): any
Reconstruct original types from serialized message
Serialize console arguments and send them to puppeteer. Unfortunately for us the native serialization methods for JSHandle objects from puppeteer are lossy. They turn Error objects into
{}
andnull
toundefined
. The passed "preview" object is incomplete and truncates all data for nested objects or other complex values.The only way to keep the data intact is to use a custom serialization format and pass it around as a string.