Chrome dev tools websockets

In the network tab in chrome dev tools when we have the following:

Websocket chrome dev tools

The time under the websocket request says pending. Websockets do not have a connection which dies. So does this pending mean that the websocket has a succesful connection now?

I’m pretty sure this is the case (since the 101 response) but not 100% sure. Also is there a way to see all the current websocket connections in chrome devtools?

How to intercept network traffic and get the response using chromedp (or alternatives)?

I’m aiming to get a specific response from the target server which cannot be retrieve directly, but via techniques such as using web driver to fire the request initiated by inherent javascript code in the web page once loaded. The request contains some code for server-side verification which for now I’m unable to decode the generating algorithm.

The “Developer Tools” in Chrome provides a convenient way to inspect the request and response, and I need to automate the process by using powerful libs such as chromedp.

AFAIK the network package provides a GetResponseBody function, but requires a requestID parameter. How can I acquire the specific request id?

cdp.ActionFunc(func(ctxt context.Context, h cdptypes.Handler) error {
        rptn := &network.RequestPattern{
            ResourceType: page.ResourceTypeScript,
        }
        network.SetRequestInterception([]*network.RequestPattern{rptn}).Do(ctxt, h)

        //begin interception
        network.ContinueInterceptedRequest("AlphaInterceptor").Do(ctxt, h)

        //How to identified the requestID?
        network.GetResponseBody("???")

        ...
}