Forum Discussion

jsc's avatar
jsc
Regular Contributor
11 years ago

Script: new WebSocket("myLoggingServer") not working

Hi all,

 

I wanted to use Websockets within Scripts in TestComplete. But unfortunately this is not as straightforward as expected.

The following code works perfectly fine on Webpages:

 

var connection = new WebSocket("myLoggingServer");
connection.onopen = function()
{
connection.send(action);
connection.close();
}

 

What is the translation into TestComplete-Scripts?

I did not find real help by googling this.

 

Best regards,

Joachim

    • jsc's avatar
      jsc
      Regular Contributor

      Hi Tanya,

       

      I just copied the code and replaced address and port but then tere was an error. 

      dotNet.System_Net_Sockets.Socket is null or no object.

       

      We just solved it completely different.

       

      Best regards,

      Joachim

  • gv2015's avatar
    gv2015
    Occasional Visitor

    Hi, 

     

    This is my first intervention here. I have the same issue as jsc though this post is kind of old.

     

    I was wondering if there are any solutions to the same problem here.

     

    'dotNET.System_Net_Sockets.TcpClient' is null or not an object 

     
    My test used to run fine until I reformated my computer. 

    I got both System and System.Net assemblies installed (tried 32-bit and 64-bit) on my x-64 computer based and nothing worked.
     
    Can someone please guide me. Thank you.