WeGouSharp
WeGouSharp copied to clipboard
初始化引擎报错
OpenQA.Selenium.WebDriverException:“The HTTP request to the remote WebDriver server for URL http://localhost:16938/session timed out after 60 seconds.”
LaunchFireFox var driver = new FirefoxDriver(fds, option, TimeSpan.FromMinutes(1));
名称 | 值 | 类型 | |
---|---|---|---|
StackTrace | " at OpenQA.Selenium.Remote.HttpCommandExecutor.MakeHttpRequest(HttpRequestInfo requestInfo)\r\n at OpenQA.Selenium.Remote.HttpCommandExecutor.Execute(Command commandToExecute)\r\n at OpenQA.Selenium.Remote.DriverServiceCommandExecutor.Execute(Command commandToExecute)\r\n at OpenQA.Selenium.Remote.RemoteWebDriver.Execute(String driverCommandToExecute, Dictionary`2 parameters)\r\n at OpenQA.Selenium.Remote.RemoteWebDriver.StartSession(ICapabilities desiredCapabilities)\r\n at OpenQA.Selenium.Remote.RemoteWebDriver..ctor(ICommandExecutor commandExecutor, ICapabilities desiredCapabilities)\r\n at OpenQA.Selenium.Firefox.FirefoxDriver..ctor(FirefoxDriverService service, FirefoxOptions options, TimeSpan commandTimeout)\r\n at WeGouSharp.Browser.LaunchFireFox(FirefoxOptions option) in F:\study\github\20190330\WeGouSharp\src\WeGouSharp\Browser.cs:line 97\r\n at WeGouSharp.Browser..ctor(ILog logger, IConfiguration config) in F:\study\github\20190330\WeGouSharp\src\WeGouSharp\Browser.cs:line 48" | string |
要看是什么模式启动的,你可能需要安装官方最新版Firefox
已经安装了最新版的Firefox。 是否需要配置什么?
66.0.2 (64 位), win10
不建议使用中文特供版Firefox, 另外可以测试在控制台直接输入firefox是否能启动浏览器,如果不能,需要换个浏览器版本 或者把当前firefox.exe加入到系统路径(PATH),并重启