Existing FF profile is not picked. FF opens a new one every time.
Version:
geckodriver 20
Platform:
Windows 10
Firefox:
FF 58
Selenium:
Selenium standalone 3.10
Selenium-java code is as follows,
String profileDir = "C:/Users/jlopez/AppData/Roaming/Mozilla/Firefox/Profiles/ddtkw80l.profile5902"; FirefoxProfile ffprofile = new FirefoxProfile();
FirefoxOptions options = new FirefoxOptions(); options.setBinary("C:\Program Files\Mozilla Firefox\firefox.exe"); options.addArguments("-profile", profileDir);
System.setProperty("webdriver.gecko.driver","C:\selenium\drivers\geckodriver.exe");
capabilities = DesiredCapabilities.firefox(); capabilities.setCapability("moz:firefoxOptions", options);
driver = new RemoteWebDriver(new URL("http://" + hubHost + ":4567/wd/hub"), capabilities);
What am I doing wrong?? FF opens up but it does not go to the URL I specify. If I comment out options.addArguments("-profile", profileDir); , it works ok, but with a new profile every time that does not have flash installed which is installed on the profile I have previously created.
This is a question rather than an issue. Please send questions to the selenium user group