Looking to load both DesiredCapabilities and a FirefoxProfile, can't figure it out and can't find an answer for it
Asked
Active
Viewed 374 times
2 Answers
2
There is the FirefoxDriver.PROFILE
capability for RemoteWebDriver.
For example,
FirefoxProfile yourProfile = new FirefoxProfile("path_to_your_profile");
DesiredCapabilities capabilities = DesiredCapabilities.firefox();
capabilities.setCapability(FirefoxDriver.PROFILE, yourProfile);

Pazonec
- 1,549
- 1
- 11
- 35
0
Create your firefox profile, i.e: "profileFF"
DesiredCapabilities cap = new DesiredCapabilities();
ProfilesIni profile = new ProfilesIni();
FirefoxProfile myprofile = profile.getProfile("profileFF");
cap.setCapability(FirefoxDriver.PROFILE, myprofile );
OR
DesiredCapabilities cap = new DesiredCapabilities();
File firefoxProfileFolder = new File("/path/to/your/firefox/profile/profileFF");
FirefoxProfile myprofile = new FirefoxProfile(firefoxProfileFolder);
cap.setCapability(FirefoxDriver.PROFILE, myprofile );

Shubhasmit Gupta
- 421
- 1
- 4
- 13