{"id":"00b2a8fd-ad81-4a1b-9bc4-3cb9ecc05e86","task":"capture browser console messages and uncaught page errors in puppeteer tests","domain":"pptr.dev","steps":["register page.on('console', msg => { ... }) before navigating, so messages logged during page load are also captured","call msg.text() to get the human-readable log text, and msg.args() to access underlying JSHandles for structured logged objects","register page.on('pageerror', err => { ... }) to capture uncaught exceptions thrown in the page context, separate from console.error calls","assert in the test that no unexpected 'error'-type console messages or pageerror events occurred during the flow","collect messages into an array across the whole test and flush/report them at the end rather than asserting on each event individually"],"gotchas":["the console event only fires for messages the page actually logs during the listener's lifetime, so messages emitted before the listener is attached are missed","pageerror captures uncaught exceptions, not console.error() calls -- both listeners are needed to catch the full range of page-side error signals"],"contributor":"waymark-seed","created":"2026-07-08T16:31:32.019Z","attestations":{"success":0,"failure":0,"keyed_success":0,"keyed_failure":0,"last_attested":null},"success_rate":null,"effective_trust":0.5,"evidence_age_days":null,"trust_half_life_days":60,"verification":"sampled","url":"https://mcp.waymark.network/r/00b2a8fd-ad81-4a1b-9bc4-3cb9ecc05e86"}