This question already has an answer here:
I am automating a website, which needs a FireFox extension.
I created a FireFox profile with the extension and all Preferences, and am trying to boot WebDriver with this profile.
I'm using Selenium 3.141.59 and FireFox 70.0
FirefoxOptions options = new FirefoxOptions();
ProfilesIni profilesIni = new ProfilesIni();
FirefoxProfile profile = profilesIni.getProfile("automacao");
options.setProfile(profile);
System.setProperty(FirefoxDriver.SystemProperty.BROWSER_LOGFILE, "/home/files/logsGeckodriver.txt");
WebDriver driver = new FirefoxDriver(options);`
I'm trying the way above, but the code above does not work! no error happens, nor does a webdriver open.
In this line he finds the profile
FirefoxProfile profile = profilesIni.getProfile("automacao");
I've tried it too
System.setProperty(FirefoxDriver.SystemProperty.BROWSER_PROFILE, "/home/henrique/.mozilla/firefox/r6eis7qo.automacao");
But this way it instantiates WebDriver, but not with the desired profile.
What am I doing wrong?