从其他服务器连接到Websocket。是否可以在Katalon中执行此操作?

时间:2018-08-01 01:41:43

标签: websocket katalon-studio

我想做与Katalon这篇文章中描述的类似的事情。 http://stackoverflow.com/questions/32016487/how-to-connect-to-a-websocket-from-a-different-server

尤其是这样的东西:

 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 = " + evt.data);
 };

 ws.onclose = function () {
     // websocket is closed.
     console.log("Connection closed...");
 };

0 个答案:

没有答案