-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] WebSocketRoute not working properly #31
Comments
WebSocketRoute rely on bindings through Runtime.addBinding to transmit the websocket messages received from a server and captured/modified by the webSocketMock injected proxy (injected with an InitScript on each page) back to playwright. As patchright removed all Runtime.enable calls from the playwright code, I think this might be the issue if bindings created by calls to the Runtime domain have to have that domain enabled to work |
I believe removing this is intentional, since applying JS proxies is genrally detectable. The way to go here would be to use a mitmproxy. Eg. smth compareable to https://github.com/ulixee/hero/blob/2ef172222db080368a0897e3eac39fa91c6598fe/agent/docs/Man-in-the-Middle.md I guess this is in our TODO's at some point - but probably not any near time. |
The whole playwright api is an injected JS script. Locators all run with a JS script injected by playwright on every page for example. So the JS webSocketMock proxy isn't the only JS playwright inject to work. |
Here it is, actually, since patchright executes all other stuff in an |
System info
Source code
Steps
Expected
Logs all the messages from WebSocket connections on the current page.
Actual
Nothing is logged. If you try with the regular Playwright it works properly.
The text was updated successfully, but these errors were encountered: