2016-11-28 6 views
0

CeliaのMarionetteとgeckodriver 0.11.1とFirefox 50でSelenium WebDriver 3.0.1.0を使用しています。私はこのObsoleteAttributeによって動機付けられたFirefoxOptionsを使用しました:FirefoxProfile設定が無視されています

FirefoxDriverはFirefoxBinaryオブジェクトで構成しないでください。 代わりにFirefoxOptionsを使用してください。

コードは次のとおりです。

FirefoxOptions fo = new FirefoxOptions(); 
firefoxProfile = new FirefoxProfile(); 
firefoxProfile.SetPreference("browser.download.folderList", 2); 
firefoxProfile.SetPreference("browser.download.dir", DOWNLOAD_FOLDER); 
firefoxProfile.SetPreference("browser.helperApps.neverAsk.saveToDisk", "text/csv"); 
firefoxProfile.SetPreference("browser.startup.homepage_override.mstone", "ignore"); 
firefoxProfile.SetPreference("trustAllSSLCertificates", true); 
firefoxProfile.AcceptUntrustedCertificates = true; 

fo.Profile = firefoxProfile; 
driver = new FirefoxDriver(fo); 

それはすべてで使用されていない指定firefoxProfileのように、SSL証明書エラーが表示され、dowloadダイアログは、プロファイルの設定にかかわらず表示されている、私には見えます。私はthis bugのためにSSL証明書のエラーを無視しないと思っていましたが、すべてのプロファイル設定が無視されているようです。

プロファイルの設定を有効にするにはどうすればよいですか? (ダウンロードダイアログは表示されず、SSLエラーは無視されます)

Marionetteに切り替える前に、そのコードは動作しましたが、Marionetteは使用する準備ができていませんか?

+0

私はIceDragonとSelenium 2.53に戻って、すべてが再び動作しています。 –

答えて

0

私は、プロファイル設定が実際に無視されたことはよく分からない:

  1. あなたがダウンロードしようとするファイルのMIME種類を確認する必要があります。それは本当にtext/csvですか?
  2. trustAllSSLCertificatesのような優先順位はありません。私はあなたが必要だと思うfirefoxProfile.SetPreference("security.ssl.enable_ocsp_stapling", false);
+0

このコードはMarionetteに切り替える前に機能しました。しかし、私は2、感謝します。 –

+0

'' security.ssl.enable_ocsp_stapling "、falseは設定に違いがありません。 –

関連する問題