由于从以下https://aus5.mozilla.org/update/3/GMP/45.4.0/20160905130425/Linux_x86_64-gcc3/en-US/esr/Linux%204.4.0-34-generic%20(GTK%203.18.9%2Clibpulse%208.0.0)/default/default/update.xml下载,似乎在Selenium中不时使用firefox 45+档位。有没有办法阻止Firefox下载此文档和任何插件?似乎设置首选项不起作用。我正在使用Selenium 3 beta 4
我设置了以下首选项,但没有任何工作:
profile.setPreference("app.update.enabled",enabled)
profile.setPreference("app.update.staging.enabled",enabled)
profile.setPreference("app.update.auto",enabled)
profile.setPreference("app.update.checkInstallTime",enabled)
profile.setPreference("app.update.silent",!enabled)
profile.setPreference("extensions.update.enabled",enabled)
if(!enabled){
profile.setPreference("app.update.interval",Int.MaxValue)
profile.setPreference("app.update.checkInstallTime.days",Int.MaxValue)
profile.setPreference("extensions.update.interval",Int.MaxValue)
profile.setPreference("app.update.lastUpdateTime.xpi-signature-verification",Int.MaxValue)
profile.setPreference("app.update.lastUpdateTime.search-engine-update-timer",Int.MaxValue)
profile.setPreference("app.update.lastUpdateTime.experiments-update-timer",Int.MaxValue)
}
profile.setPreference("media.gmp-gmpopenh264.enabled",enabled)
profile.setPreference("media.gmp-provider.enabled",false)
profile.setPreference("media.gmp-manager.lastCheck",Int.MaxValue)
profile.setPreference("media.gmp-gmpopenh264.lastUpdate",Int.MaxValue)
首选项似乎是在about:config中设置的,但我仍然看到以下是我的工具在几十到1000次测试后冻结的地方。由于需要旋转代理和许多带有2个盒子的并发测试,网格是不可能的。
1475863716583 addons.productaddons INFO sending request to: https://aus5.mozilla.org/update/3/GMP/45.4.0/20160905130425/Linux_x86_64-gcc3/en-US/esr/Linux%204.4.0-34-generic%20(GTK%203.18.9%2Clibpulse%208.0.0)/default/default/update.xml
1475863716756 addons.productaddons INFO Completed downloading document
1475863717793 addons.productaddons INFO sending request to: https://aus5.mozilla.org/update/3/GMP/45.4.0/20160905130425/Linux_x86_64-gcc3/en-US/esr/Linux%204.4.0-34-generic%20(GTK%203.18.9%2Clibpulse%208.0.0)/default/default/update.xml
1475863717914 addons.productaddons INFO Completed downloading document