selenium server无法连接到远程服务器

时间:2017-08-16 01:09:02

标签: c# asp.net selenium selenium-webdriver selenium-server

我正在尝试使用以下代码在selenium中启动远程驱动程序 在服务器端

DesiredCapabilities capability = DesiredCapabilities.Chrome();
Uri url = new Uri("http://www.globalcontactcentre.org:99/wd/hub");
IWebDriver site = new RemoteWebDriver(url, capability);

使用以下字符串启动selenium服务器: java -jar F:\ sawy \ driver \ selenium-server-standalone-3.5.0.jar -port 99

我允许通过防火墙中的端口99进行连接

但我仍然遇到此错误客户端

  

意外错误。 System.Net.WebException:无法连接到远程服务器---> System.Net.Sockets.SocketException:无法建立连接,因为目标计算机主动拒绝它MY-IP:99     在System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot,SocketAddress socketAddress)     在System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure,Socket s4,Socket s6,Socket& socket,IPAddress& address,ConnectSocketState state,IAsyncResult asyncResult,Exception& exception)     ---内部异常堆栈跟踪结束---     在System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)     在System.Net.HttpWebRequest.GetRequestStream()

甚至我尝试了但是try catch语句中的代码

0 个答案:

没有答案
相关问题