Setting Firefox Preferences via Selenium 2 (WebDriver API)

I wanted to run Firefox from WebDriver with custom preferences.  So I looked into the well-known about:config for name of the option and, just to be sure, consulted About:config entries section of Mozilla Wiki.

With the name of desired config option to change, the rest is a pieceof cake:

FirefoxProfile profile = new FirefoxProfile();
WebDriver webDriver =  new FirefoxDriver(profile);

No comments:

Post a Comment