Currently if I wanted to log some information to the trace files I would need to write something like:
let someMessage = 'needs to be inside page.eval'
await page.evaluate((someMessage) =>{ console.log(someMessage)}, someMessage);
It would be nice if we had a native PW api that did this for me e.g. await page.consolelog('whatever')
As an extra requirement, it would be also nice if this function accepted an object too. Something like
let someObj = {blah: true, v: 100}
await page.consolelog(someObj)
Which would result in a nicely formatted json shown in the trace file
Currently if I wanted to log some information to the trace files I would need to write something like:
It would be nice if we had a native PW api that did this for me e.g.
await page.consolelog('whatever')As an extra requirement, it would be also nice if this function accepted an object too. Something like
Which would result in a nicely formatted json shown in the trace file