selenium,错误 10047(不支持地址族),但使用 try/catch(有解决方法)
我正在使用 C# 和 selenium。一切正常,没有问题。 今天在 Visual Studio 中调试我的程序时,我在这一行收到错误:
this.WebDriver = new FirefoxDriver(bin, profile);
错误是:
System.Net.Sockets.SocketError.AddressFamilyNotSupported
ErrorCde 10047
我使用的完整代码是:
var profile = new FirefoxProfile();
FirefoxBinary bin = new FirefoxBinary();
this.WebDriver = new FirefoxDriver(bin, profile);
我有一个解决方法:
var profile = new FirefoxProfile();
FirefoxBinary bin = new FirefoxBinary();
try
{
this.WebDriver = new FirefoxDriver(bin, profile);
}
finally
{
}
我不知道为什么现在有这个错误,我已经切换最近选项有些错误,也许就是这个原因。
我能做些什么?如果我真的不需要的话,我不想忽略这个错误。
I am using C# and selenium. Everything was working okay, no problems.
Today when debugging my program in Visual Studio I get an error at this line:
this.WebDriver = new FirefoxDriver(bin, profile);
The error ist:
System.Net.Sockets.SocketError.AddressFamilyNotSupported
ErrorCde 10047
The complete code I use is:
var profile = new FirefoxProfile();
FirefoxBinary bin = new FirefoxBinary();
this.WebDriver = new FirefoxDriver(bin, profile);
I have a work around for that:
var profile = new FirefoxProfile();
FirefoxBinary bin = new FirefoxBinary();
try
{
this.WebDriver = new FirefoxDriver(bin, profile);
}
finally
{
}
I don't know why I have this error now, I have switched on some errors in options recently, maybe this is the reason.
What can I do? I don't want to just ignore this error, if I really don't have to.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
难道是你的防火墙阻止了你的程序?您可以再次禁用它进行测试吗?
Can it be that you have a firewall that blocks your program? Can you disable it an test again?