Firefox webdriver opens first run page all the time

前端 未结 8 2221
醉梦人生
醉梦人生 2020-12-03 04:09

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/le

8条回答
  •  执笔经年
    2020-12-03 05:06

    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.

提交回复
热议问题