Starting just last night, the FirefoxDriver has been always opening on this page: https://www.mozilla.org/en-US/firefox/42.0/firstrun/learnmore/
. I have tried c
I was having this problem when running RSpec/Capybara tests using a Selenium Webdriver and Poltergeist with Firefox as the browser for a Rails app. Tried reconfiguring Firefox in various ways to no avail but managed to fix by simply updating the selenium-webdriver gem in my Gemfile (gem 'selenium-webdriver'
):
bundle update selenium-webdriver
Credit goes to @lucetzer
I had the same problem with the first run page, after some searching I found that this worked for me (I use WebDriver 2.53.0 and FF 45.0.1):
FirefoxProfile profile = new FirefoxProfile();
profile.setPreference("browser.startup.homepage_override.mstone", "ignore");
profile.setPreference("startup.homepage_welcome_url", "about:blank");
profile.setPreference("startup.homepage_welcome_url.additional","about:blank");
profile.setPreference("browser.startup.homepage","about:blank");
WebDriver driver = new FirefoxDriver(profile);
Go to profile manager using "Firefox.exe - p"
You will have more than one profile. Please select default profile and make it default all time.
It should not open that page. i tested and it works fine.
You can try this code. I am pretty sure it will work.
ProfilesIni profile = new ProfilesIni();
FirefoxProfile ffprofile = profile.getProfile("default");
WebDriver driver = new FirefoxDriver(ffprofile);
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
There is an issue with the certificates in the first run splash screen of the Mozilla homepage. I filed a ticket for this in Bugzilla: https://bugzilla.mozilla.org/show_bug.cgi?id=1269500
To fix this issue in Selenium/Capybara/Cucumber, we need to change the default homepage for new profiles to blank or another page. To do so, register your firefox/selenium driver in the configuration:
Capybara.register_driver :firefox do |app|
profile = Selenium::WebDriver::Firefox::Profile.new
profile['browser.startup.homepage_override.mstone'] = 'ignore'
profile['startup.homepage_welcome_url.additional'] = 'about:blank'
Capybara::Selenium::Driver.new(app, :browser => :firefox, :profile => profile)
end