What profile does Selenium WebDriver use by default?

I will answer it, supporting comment from @twall: When starting firefox in Selenium 2 WebDriver, it starts new, anonymous profile.

However, if you want to change it, you can create new Firefox profile and name it somehow, you know what it is - e.g. SELENIUM

Then in your code do this:

 ProfilesIni profile = new ProfilesIni();
 FirefoxProfile ffprofile = profile.getProfile("SELENIUM");
 WebDriver driver = new FirefoxDriver(ffprofile);

That way, Firefox will always start that profile. In the profile you do all the settings you need


You can assign to each Selenium grid 2 node a specific firefox profile:

java -jar selenium-server-standalone-2.37.0.jar -Dwebdriver.firefox.profile=my-profile -role node -hub http://example-server.org:4444/grid/register

Notice that the value of the webdriver.firefox.profile has to be the firefox profile name, not the location or the folder name