0

Looking to load both DesiredCapabilities and a FirefoxProfile, can't figure it out and can't find an answer for it

Vic
  • 93
  • 1
  • 9
  • 1
    possible duplicate of [How to load only html from web pages in selenium](http://stackoverflow.com/questions/27766994/how-to-load-only-html-from-web-pages-in-selenium) – Andy Turner Sep 22 '15 at 23:21

2 Answers2

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