开发者

SocketException when creating new InternetExplorerDriver with Selenium 2.7.0

开发者 https://www.devze.com 2023-04-07 23:11 出处:网络
I\'m trying to create a new instance of the Selenium InternetExplorerDriver to run a simple test and I\'m receiving the following exception message:

I'm trying to create a new instance of the Selenium InternetExplorerDriver to run a simple test and I'm receiving the following exception message:

SocketException occurred
No connection could be made because the target machine actively refused it ::1:56335

What exactly is it trying to connect to at this point? I've tried setting proxy settings for the driver with the following code but still receive the same error:

var proxy = new Proxy { ProxyAutoConfigUrl = "http://myworkproxy.removed.co开发者_StackOverflow社区m:1234" };
var capabilities = DesiredCapabilities.InternetExplorer();
capabilities.SetCapability(CapabilityType.Proxy, proxy);
driver = new InternetExplorerDriver(capabilities);

I've had a search but can't find much documentation for the latest version of Selenium. Any suggestions?


If you are using the latest version of Selenium (selenium-webdriver), then the SocketException occurred, because your code cannot connect to the Selenium Server on the default port (I believe 4444). This might be because you haven't launched the selenium server (comes as a jar file - see the Selenium home page) or there might be another application that is using the same port that you are trying to connect to.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号