If that won’t work, because you’re using a self-signed certificate or something like that, you can use the insecureSkipTLSVerify k6 option to tell k6 not to do any TLS certificate validation whatsoever.
@LiliiaK using the insecureSkiptTLSVerify option should still apply, although I have to say that if you need to pass some cookie in order to make the http request you aren’t going to be able because k6 just doesn’t support this for websocket connections … yet, sorry