Firefox webdriver始终打开第一个运行页面 [英] Firefox webdriver opens first run page all the time
问题描述
创建FF驱动程序时,打开选项卡 -
< a href =https://www.mozilla.org/en-US/firefox/42.0/firstrun/learnmore/ =noreferrer> https://www.mozilla.org/zh-CN/firefox/42.0 / firstrun / learnmore /
和额外的目标页面标签。
开始页面:
在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);
...并且永远不会再打扰您。
注意:其中一个设置也将工作。我一起使用它们来防弹。
How to disable this "first run" page once and for all for FF?
When FF driver is created, it opens tab with - https://www.mozilla.org/en-US/firefox/42.0/firstrun/learnmore/ and additional tab with target page.
To turn off this annoying start page:
in C# with Selenium 2.48 I found the following solution:
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);
...and it will never bother you again.
Note: One of these settings alone will also work. I use them together to make it bullet-proof.
这篇关于Firefox webdriver始终打开第一个运行页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!