What profile does Selenium WebDriver use by default?


Where does Selenium WebDriver (a.k.a Selenium 2) get the anonymous profile that it uses when it opens FirefoxDriver? If it used the default for Firefox, %appdata%/roaming/mozilla/firefox/profiles, then if I were to disable a firefox plugin, it should be disabled for Selenium WebDriver also, so why isn’t it?

  • You must to post comments

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 must to post comments
Showing 1 result
Your Answer
Post as a guest by filling out the fields below or if you already have an account.