我目前在使用selenium初始化Firefox时遇到问题。这个问题似乎只发生在Windows Server 2012 r2上,因为我在本地机器上尝试了相同的配置(Windows 10),并且它没有问题。对http:// localhost:6444/session的远程WebDriver服务器的HTTP请求在60秒后超时
我目前使用此代码(C#):
FirefoxDriverService service = FirefoxDriverService.CreateDefaultService("Path to Drivers folder", "geckodriver.exe");
service.Port = 6444;
service.FirefoxBinaryPath = "Firefox installation path";
ffDriver = new FirefoxDriver(service);
但是,它返回此错误:使用
OpenQA.Selenium.WebDriverException: The HTTP request to the remote WebDriver server for URL http://localhost:6444/session timed out after 60 seconds. ---> System.Net.WebException: The operation has timed out
当前版本:
- 火狐56.0 64位
- 硒3.5.1
- Geckodriver v0.19.0 64bit
有人可以引导我通过这个问题吗?
是否使用firefoxprofile – iamsankalp89
@ iamsankalp89我已经加入这一行: FirefoxProfile配置=新FirefoxProfile(); 但是,结果是一样的。 – user1343543