I've googled arround but found no answer for my question. I'd like to have Selenium always opening firefox with the same profile. This is my code:
final File pathBinary = new File(properties.getProperty("firefox.webdriver.path"));
final File profileDir = new File("C:\\temp\\profile");
final FirefoxBinary firefoxBinary = new FirefoxBinary(pathBinary);
final FirefoxProfile firefoxProfile = new FirefoxProfile(profileDir);
System.setProperty("webdriver.gecko.driver", "D:/selenium_drivers/firefox/geckodriver.exe");
capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.PROFILE, firefoxProfile);
capabilities.setCapability("marionette", true);
driver = new FirefoxDriver(capabilities);
Could you help?