安全な接続(HTTPS)で私のサイトをテストすると "本当の"解決策が見つからなかったので、セレンテストを開発しています。私はstackoverflowの上で見つかったすべてのソリューションは古くなっているか、動作しません:Selenium firefoxドライバでacceptntrustedcertificatesをtrueに設定するのはなぜ機能しませんか?
- I am writing a Selenium script in Firefox but I am getting "Untrusted Certificate"
- How to disable Firefox's untrusted connection warning using Selenium?
- Handling UntrustedSSLcertificates using WebDriver
私が持っている唯一の回避策は、と毎晩Mozillaのリリースを使用することですgithub上に示される:https://github.com/mozilla/geckodriver/issues/420
private IWebDriver driver;
private string baseURL;
private FirefoxOptions ffOptions;
private IWait<IWebDriver> wait;
[SetUp]
public void SetupTest()
{
ffOptions = new FirefoxOptions();
ffOptions.BrowserExecutableLocation = @"D:\AppData\Local\Nightly\firefox.exe";
FirefoxProfile profile = new FirefoxProfile();
profile.AssumeUntrustedCertificateIssuer = false;
profile.AcceptUntrustedCertificates = true;
ffOptions.Profile = profile;
ffOptions.LogLevel = FirefoxDriverLogLevel.Info;
driver = new FirefoxDriver(FirefoxDriverService.CreateDefaultService(), ffOptions, TimeSpan.FromSeconds(30));
//[...]
}
構成:
- のFirefox v47.0.1、v49.0.2、v51.0.1、0.14
- セレン3.1.0 geckodriver v52.0b9(私はこれらの貴様のバージョンを試してみました)
夜間リリースの使用を避けるためのソリューションはありますか?
私はインターネットポリシーのためにstackoverflowとgithubにしかアクセスできません。私にはchromeの使用を提案しないでください!
ありがとうございました!
"動作しませんか?"何も意味しません、エラーとログを入れてください – parik
私は安全なページ(https)である私のページにアクセスしているので、あなたの接続は安全ではありません。これは証明書が信頼できない/有効でないことを示しています –