MCPcopy Index your code
hub / github.com/codeceptjs/CodeceptJS / grabBrowserLogs

Method grabBrowserLogs

lib/helper/Playwright.js:2514–2518  ·  view source on GitHub ↗

* Get JS log from browser. * * ```js * const logs = await I.grabBrowserLogs(); * const errors = logs.map(l => ({ type: l.type(), text: l.text() })).filter(l => l.type === 'error'); * console.log(JSON.stringify(errors)); * ``` * [Learn more about console messages](https://playwri

()

Source from the content-addressed store, hash-verified

2512 * @return {Promise<any[]>}
2513 */
2514 async grabBrowserLogs() {
2515 const logs = consoleLogStore.entries
2516 consoleLogStore.clear()
2517 return logs
2518 }
2519
2520 /**
2521 * {{> grabCurrentUrl }}

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected