🚀 Feature Request
Playwright currently provides:
page.route() / page.unroute() for HTTP request routing
page.routeWebSocket() for WebSocket routing
However, there is no equivalent to remove a previously registered WebSocket route handler (for example, something like page.unrouteWebSocket()).
Example
No response
Motivation
I want to test that my web application behaves correctly when the connection to the WebSocket server drops and cannot be re-established.
The current problem is that Playwright’s WebSocket always sends an open event. However, the test should cover the case where a connection is never established in the first place. So simply calling ws.close() on the WebSocket is not sufficient.
🚀 Feature Request
Playwright currently provides:
page.route()/page.unroute()for HTTP request routingpage.routeWebSocket()for WebSocket routingHowever, there is no equivalent to remove a previously registered WebSocket route handler (for example, something like
page.unrouteWebSocket()).Example
No response
Motivation
I want to test that my web application behaves correctly when the connection to the WebSocket server drops and cannot be re-established.
The current problem is that Playwright’s WebSocket always sends an
openevent. However, the test should cover the case where a connection is never established in the first place. So simply callingws.close()on the WebSocket is not sufficient.