【发布时间】:2017-12-01 13:15:03
【问题描述】:
我在 Stack 上寻找解决方案,但在我的情况下没有任何效果。 我试过了:
public RemoteWebDriver runDriver()
{
FirefoxDriverService service =
FirefoxDriverService.CreateDefaultService();
service.HideCommandPromptWindow = true;
FirefoxBinary fb = new FirefoxBinary();
FirefoxProfile fprofile = new FirefoxProfile();
FirefoxOptions fo = new FirefoxOptions();
fo.Profile = fprofile;
fprofile.AcceptUntrustedCertificates = true;
和:
fprofile.SetPreference("network.automatic-ntlm-auth.trusted-uris", very_dangerous_url);
说到重点:
fb.StartProfile(fprofile);
return driver;
}
它坏了。
我正在使用 Selenium Webdriver 在 C# 中工作,我希望我的浏览器接受一个没有证书的页面。
【问题讨论】:
-
它打破的错误是什么?
标签: c# firefox selenium-webdriver firefox-profile