当我执行以下行时
driver = new RemoteWebDriver(new Uri("http://localhost:4444/wd/hub"), oCapabilities, TimeSpan.FromSeconds(timeout));
Firefox生成错误“安全连接失败”。我猜测代理被阻止了,我该如何阻止呢?
我正在关注此页面但没有成功: http://www.seleniumhq.org/docs/04_webdriver_advanced.jsp
答案 0 :(得分:0)
1-)不得不更新selenium驱动程序。
2-)另外,firefox总是打开,好像它是第一次使用。为了防止这种情况:
FirefoxProfile profile = new FirefoxProfile();
profile.SetPreference("browser.startup.homepage_override.mstone", "ignore");
DesiredCapabilities capabilities = DesiredCapabilities.Firefox();
capabilities.SetCapability(FirefoxDriver.ProfileCapabilityName, profile.ToBase64String()); // profile MUST be converted to this type
driver = new RemoteWebDriver(new Uri(remoteAddress), capabilities, TimeSpan.FromSeconds(timeout));