Skip to content

Commit 0b1604a

Browse files
authored
[test] Properly log framereceived payload (#91266)
1 parent 5ef117c commit 0b1604a

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

test/lib/browsers/playwright.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,8 +333,12 @@ export class Playwright<TCurrent = undefined> {
333333
websocketFrames.push({ payload: frame.payload })
334334

335335
if (tracePlaywright) {
336+
const { payload } = frame
336337
page
337-
.evaluate(`console.log('received ws message ${frame.payload}')`)
338+
// Note that passing the payload as a an argument is 2 orders of magnitude more expensive in Playwright.
339+
.evaluate(
340+
`console.log('received ws message ${JSON.stringify(payload)}')`
341+
)
338342
.catch(() => {})
339343
}
340344
})

0 commit comments

Comments
 (0)