Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Firefox webdriver opens first run page all the time

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.

like image 872
divide by zero Avatar asked Nov 26 '15 11:11

divide by zero


1 Answers

To turn off this annoying start page:

More protection. The most privacy. Mozilla Firefox firstrun screen

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.

like image 153
Elmue Avatar answered Sep 18 '22 19:09

Elmue