【发布时间】:2011-12-30 01:06:02
【问题描述】:
我正在尝试创建 Selenium InternetExplorerDriver 的新实例来运行一个简单的测试,我收到以下异常消息:
SocketException occurred
No connection could be made because the target machine actively refused it ::1:56335
此时它到底想连接什么?我尝试使用以下代码为驱动程序设置代理设置,但仍然收到相同的错误:
var proxy = new Proxy { ProxyAutoConfigUrl = "http://myworkproxy.removed.com:1234" };
var capabilities = DesiredCapabilities.InternetExplorer();
capabilities.SetCapability(CapabilityType.Proxy, proxy);
driver = new InternetExplorerDriver(capabilities);
我进行了搜索,但找不到关于 Selenium 最新版本的太多文档。有什么建议吗?
【问题讨论】:
标签: c# webdriver selenium-webdriver socketexception