Connecting to a websocket from a different server

Is it possible to do the following within Katalon?

In particular, something like this:

 var ws = new WebSocket('wss://ServerA:8080/', 'echo-protocol'); ws.onopen = function () {     console.log('socket connection opened properly');     ws.send("Hello World"); // send a message     console.log('message sent'); }; ws.onmessage = function (evt) {     console.log("Message received = " +; }; ws.onclose = function () {     // websocket is closed.     console.log("Connection closed..."); };

I was able to connect to a WebSocket server on my localhost with the following website example.
I implemented the two classes shown in the example URL as keywords in Katalon, and then I used SimpleEchoClient keyword in a test script to connect and send and receive messages to the server. Adapting the SimpleEchoSocket file should get you something close to your specific needs.

can you please share the code

I am facing this error when I try to cover the classes in to keywords

can you be able to help me on this