Collects console output, page errors, and network requests from a page.
The Playwright page to inspect.
Capped, JSON-serialisable diagnostics. Never throws.
ui5Diagnostics.collect
const diagnostics = await collectPageDiagnostics(page);await testInfo.attach('ui5-diagnostics', { contentType: 'application/json', body: Buffer.from(JSON.stringify(diagnostics, null, 2), 'utf8'),}); Copy
const diagnostics = await collectPageDiagnostics(page);await testInfo.attach('ui5-diagnostics', { contentType: 'application/json', body: Buffer.from(JSON.stringify(diagnostics, null, 2), 'utf8'),});
Collects console output, page errors, and network requests from a page.