microsoft / playwright

Playwright is a framework for Web Testing and Automation. It allows testing Chromium, Firefox and WebKit with a single API.
https://playwright.dev
Apache License 2.0
66.92k stars 3.67k forks source link

[Feature] Include websocket frames in the trace-viewer #10996

Open Bessonov opened 2 years ago

Bessonov commented 2 years ago

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.

mxschmitt commented 2 years ago

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.

Bessonov commented 2 years ago

My use case is exclusively json based

unlikelyzero commented 2 years ago

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.

Oscaruzzo commented 1 year ago

+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.

Sysqwerty commented 1 year ago

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)

nicolasgarfinkiel commented 1 year ago

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

mofojed commented 1 year ago

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

snackattas commented 9 months ago

Also ➕ 1️⃣ to this

amalsgit commented 7 months ago

+1

AAAver commented 7 months ago

+1

serhatgemici commented 2 months ago

+1

satyamsi commented 2 months ago

+1

ulrichstark commented 6 days ago

+1