I have some selenium tests running on Firefox browser.
unfortunatly, although I take care to create a new profile, I always have the /firstrun/
page of Firefox showing up when my test start, which is rather annoying, since that page gets it content over the web.
I've tried disabling it the following way
FirefoxProfile profile = new FirefoxProfile(profileDir);
if(!exists) {
profile.setPreference("signed.applets.codebase_principal_support", true);
profile.setPreference("capability.principal.codebase.p0.granted", true);
profile.setPreference("startup.homepage_override_url", "about:blank");
profile.setPreference("browser.startup.homepage_override.mstone", "'ignore'");
but it stills shows up.
What can I do to make sure Firefox starts with no page shown ?
Kiril asks the right question - "Why the single quotes?". Without it works for me.
profile.setPreference("browser.startup.homepage_override.mstone", "ignore");
An alternative approach is to load the blank page after the Firefox instance has been created (driver.get("about:blank");)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With