div*_*ero 42 firefox selenium selenium-firefoxdriver selenium-webdriver
如何为FF暂时禁用这个"首次运行"页面?
创建FF驱动程序时,它会打开选项卡,其中包含 - https://www.mozilla.org/en-US/firefox/42.0/firstrun/learnmore/ 以及带有目标页面的附加选项卡.
Elm*_*mue 23
要关闭这个烦人的起始页面:
在C#中使用Selenium 2.48我找到了以下解决方案:
FirefoxProfile prof = new FirefoxProfile();
prof.SetPreference("browser.startup.homepage_override.mstone", "ignore");
prof.SetPreference("startup.homepage_welcome_url.additional",  "about:blank");
Driver = new FirefoxDriver(prof);
Run Code Online (Sandbox Code Playgroud)
......它永远不会打扰你.
注意:仅这些设置之一也可以使用.我一起使用它们使它成为防弹.
小智 10
如果解决方案,工作正常
FirefoxProfile fp = new FirefoxProfile();
fp.setPreference("browser.startup.homepage", "about:blank");
fp.setPreference("startup.homepage_welcome_url", "about:blank");
fp.setPreference("startup.homepage_welcome_url.additional", "about:blank");
Run Code Online (Sandbox Code Playgroud)
        这是由 Selenium 和 Firefox 版本之间不兼容引起的,而不是由任何一个特定版本号引起的。
如果您的 WebDriver 是最新版本,您的 Firefox 版本应该比最新版本低 1-2 个。否则,如果您的 WebDriver 较旧,请进一步回滚 Firefox 版本,或升级 Webdriver。
要获取旧版 Firefox,请尝试https://ftp.mozilla.org/pub/firefox/releases/或http://www.oldapps.com/
或在 Linux 上,具体取决于您的发行版
yum list --showduplicates firefox
sudo yum install firefox-<version>
Run Code Online (Sandbox Code Playgroud)
或者
apt-cache show firefox | grep Version
sudo apt-get install firefox=<version>
Run Code Online (Sandbox Code Playgroud)
        |   归档时间:  |  
           
  |  
        
|   查看次数:  |  
           30010 次  |  
        
|   最近记录:  |