Get Websocket messages with Selenium

2,989 views
Skip to first unread message

Anatoliy Omelchenko

unread,
Nov 5, 2015, 11:08:12 PM11/5/15
to Selenium Users
Hi guys, is it possible to get websocket messages with Selenium Webdriver?

We are using both REST and Websocket API in our client-server application, and now we want to increase test coverage and check that our UI changes was applied on websocket layer. I know that WebDriver and Safari connected with websocket, so is there a possibility to catch websocket messages?

Dmitri T

unread,
Nov 6, 2015, 10:16:10 AM11/6/15
to Selenium Users
Selenium is browser automation framework so it won't be able to go as deep as websockets messages level. Consider using Apache JMeter with WebSocket Sampler plugin for WebSockets connectivity and WebDriver Sampler plugin for Selenium integration.

David

unread,
Nov 6, 2015, 5:37:58 PM11/6/15
to Selenium Users
Might be able to route the Selenium tests through a proxy server to capture the websocket (HTTP) messages to analyze (later) as well. Or if anyone builds Firefox plugins to help with that like how there are some for HAR files and network capture that some folks use with Selenium, although the proxy server approach gives you a cross-browser solution.
Reply all
Reply to author
Forward
0 new messages