I want to get information from a web socket running on a website. however since I am not aware of handshaking process I am unable to establish a successful connection to the websocket and retrieve the information being published on the websocket. I assume this falls on the website confidentiality and unless they provide me the documents it is highly unlikely I can get the data directly from the websocket (please correct me if I am wrong).
However since I can view the data from "WS" tab in network section of the chrome (developer mode). I was wondering if there is a way to replicate this programmatically using selenium or any headless browser and I get this information inside my program. my main objective is to get the information using C# however I am open to any other way to get this data.
Complete source code is provided here
Note that you should wait until the chrome driver quit. Then in console you'll see the sent and received messages