Grab console output on failure

#1

Is it possible to grab the console output if a test szenario fails?

I have created a hook which triggered on failure. How do i now access the browser console? As helper i use puppeteer.

#2

https://codecept.io/helpers/Puppeteer#grabbrowserlogs

Puppeteer has a method called grabBrowserLogs. In your hook you can use it with I.