Forum Discussion

firdosh's avatar
firdosh
New Contributor
8 years ago

How to pass IPv6 address in Browsers.Item().Run()?

Hi,

I am trying to pass a IPv6 address as "https://[<IPv6_addr>]:<port_num>" to Browsers.Item().Run(). Getting an error as "The parameter in incorrect". What is the correct way to pass an IPv6 address.

 

Regards,

    • firdosh's avatar
      firdosh
      New Contributor

      Here, I just the mentioned the routine which I am using. And of course, I have mentioned the browser type in my script :)

       

      var natIP = "x:x:x:x:x:x:x:x";

      natIP = "[" + natIP + "]"; // IPv6 address needs to be enclosed within []

      var loginURLStr = "https://" + natIP + ":5480";
      Browsers.Item(btIExplorer).Run(loginURLStr);

      The above snippet works fine for an IPv4 address, but throws error message for an IPv6 address.

       

      Regards,

      Mohammed Firdosh Nasim.

      • shankar_r's avatar
        shankar_r
        Community Hero

        Hi,

         

        This is just a guess, Can you try chr function instead of using [].

         

        Ex:

        natIP = chr(91) + natIP + chr(93); // IPv6 address needs to be enclosed within []

         

        i'm not having web module to check this