So, when I try to open firefox like it either pops up really quickly, or it just stays there for a second until I can see it then crashes Also, I use selenium version 2.53.1
WebDriver driver = new FirefoxDriver();
driver.get("http://stackoverflow.com");
Just like the other drivers available to Selenium from other browser vendors, Mozilla has released an executable
geckodriver
that will run alongside the browser.You need to download latest executable geckodriver from here and set this downloaded path from your machine as system property to run your test case with
Firefox
driver as below :