在对Webdriver进行故障排除时,我们发现在运行webdriver3.14时,很少有流量命中代理,而其流量之一命中防火墙,而在较低版本的Webdriver中,它没有命中防火墙,并且所有流量都正确地通过了代理。 由于较低版本的代理可以很好地工作,因此新版本还应该选择使用代理进行连接
当我尝试使用旧版本的webdriver在browserstack服务器上运行selenium代码时,它工作正常,但是当尝试使用最新版本的webdriver3.141运行时,则抛出如下所示的异常: 讯息:
Unexpected error. System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond 207.254.8.3:80
at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Exception& exception)
--- End of inner exception stack trace ---
at System.Net.HttpWebRequest.GetRequestStream(TransportContext& context)
at System.Net.HttpWebRequest.GetRequestStream()
at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)
at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)
at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)
我想运行最新的webdriver3.141版本,有人可以帮我解决这个问题吗?