Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/selenium/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Firefox想在我使用selenium时更新吗?_Selenium - Fatal编程技术网

Firefox想在我使用selenium时更新吗?

Firefox想在我使用selenium时更新吗?,selenium,Selenium,Firefox在我的电脑上是最新的,但当我使用selenium时,它有时会说我需要或应该更新,从而把我的程序弄乱了。最终,这个窗口会阻止我的程序运行。有什么方法可以阻止它吗? 谢谢。如果这是在一台可以访问firefox的机器上,它有一个设置,允许您禁用检查更新,这是最简单的方法 如果要对所有测试运行强制执行此操作,显然以下操作应该有效: FirefoxProfile profile = new FirefoxProfile(); profile.setPreference("app.update

Firefox在我的电脑上是最新的,但当我使用selenium时,它有时会说我需要或应该更新,从而把我的程序弄乱了。最终,这个窗口会阻止我的程序运行。有什么方法可以阻止它吗?
谢谢。

如果这是在一台可以访问firefox的机器上,它有一个设置,允许您禁用检查更新,这是最简单的方法

如果要对所有测试运行强制执行此操作,显然以下操作应该有效:

FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("app.update.auto", false);
profile.setPreference("app.update.enabled", false);
FirefoxDriver browser = new FirefoxDriver(profile);

除了公认的答案外:

1.)如果每次运行测试时都要重用相同的FF配置文件,则可以更改他在关于:配置FF配置文件中提到的两个自动更新设置

2.)还有其他设置(例如,过时的插件可能导致FF更新,自动更新的扩展选项需要关闭),这可能有助于:

3.)在执行上述1和2之后,如果仍然存在问题,则从Mozilla程序文件夹(C:\program Files\Mozilla Firefox\或x86位置)中删除updater.exe可能会解决问题,但也可能会像从程序文件夹中删除文件一样,随时导致意外问题