playwright icon indicating copy to clipboard operation
playwright copied to clipboard

[Feature] Include websocket frames in the trace-viewer

Open Bessonov opened this issue 3 years ago • 15 comments

Hey guys! Playwright is amazing and thank you very much for it!

I rely heavily on WebSockets and it would be nice if they could be included in the trace viewer.

Bessonov avatar Dec 17 '21 14:12 Bessonov

web-socket traffic is often binary or JSON based - what kind of data are you sending? Having the JSON of the request and response frames visualised would be also required then.

mxschmitt avatar Dec 17 '21 17:12 mxschmitt

My use case is exclusively json based

Bessonov avatar Dec 17 '21 17:12 Bessonov

This would be amazing for us as well!

Ultimately our team has chosen playwright over Cypress for many reasons, but websocket "support" is one of them.

unlikelyzero avatar Dec 20 '21 19:12 unlikelyzero

+1 on this. We have some websocket traffic (push notifications, mainly, plus some relatively small data, all json based) and it would be REALLY useful to include this in traces.

Oscaruzzo avatar Mar 07 '23 09:03 Oscaruzzo

Hi guys. Same for our team. It would be really cool to have WebSockets logs in the Trace report. Our application uses WS for a bunch of functionalities through all the system.

Hi, @mxschmitt, do you plan to implement it? (I see the ticket is open more than 1.5 years ago)

Sysqwerty avatar Jul 24 '23 08:07 Sysqwerty

+1 and I wouldn't mind taking a stab at adding this info to the viewer if no one is working on it.

nicolasgarfinkiel avatar Aug 24 '23 11:08 nicolasgarfinkiel

This would be handy. Note you can print out WebSocket frames that are sent/received to the console: https://playwright.dev/docs/network#websockets Having it in the Network tab would be much more convenient though. One thing I can't get from the above API is the CloseEvent when the websocket is closed - Playwright just returns the WebSocket on close, I'm not sure how to get the information of that CloseEvent: https://developer.mozilla.org/en-US/docs/Web/API/WebSocket/close_event

mofojed avatar Aug 29 '23 13:08 mofojed

Also ➕ 1️⃣ to this

snackattas avatar Jan 24 '24 22:01 snackattas

+1

amalsgit avatar Mar 21 '24 12:03 amalsgit

+1

AAAver avatar Apr 02 '24 08:04 AAAver