1

I'm trying to tell the org.openqa.selenium.firefox.FirefoxDriver of Selenium to use an existing profile along with its cookies and proxy settings, so I'm doing:

FirefoxProfile firefoxProfile = new FirefoxProfile(new File("C:\\Users\\name\\AppData\\Local\\Mozilla\\Firefox\\Profiles\\u72231ej.other"));

WebDriver driver = new FirefoxDriver(firefoxProfile);

But it seems that a new profile is created no matter what.

Charles
  • 50,943
  • 13
  • 104
  • 142
Fluffy
  • 27,504
  • 41
  • 151
  • 234

1 Answers1

2
FirefoxProfile ffprofile = new FirefoxProfile();
ffprofile.setPreference(); //Set your preference here
FirefoxDriver driver = new FirefoxDriver(ffprofile);

You can get the list of preferences by typing about:config in the firefox address bar. New driver will have a profile with your settings applied.

gkns
  • 697
  • 2
  • 12
  • 32