MachinePublishers / jBrowserDriver

A programmable, embeddable web browser driver compatible with the Selenium WebDriver spec -- headless, WebKit-based, pure Java
Other
809 stars 143 forks source link

Cookies not sent for WebSocket requests #325

Open KPhi opened 6 years ago

KPhi commented 6 years ago

When opening a WebSocket connection via JavaScript, jBrowserDriver doesn't send any cookies with the upgrade request, effectively rendering any session state unusable. Also, these requests aren't output in the wire log.

Here is how the sent headers look like in a browser when creating a WebSocket connection (note the sent session cookie): browser

This is what jBrowserDriver sends: jbrowserdriver

I've also created a WAR for Tomcat 7 which contains the web-app I tested with: WebSocketTest.zip