Firefox profile and preferences in selenium

Firefox profile is basically the personal settings of the firefox browser.

Firefox profile contains information like your homepage, bookmarks, browser settings, history, saved passwords, download directory etc.

Profile is basically a specific folder stored locally in your hard drive other than your firefox installation folder.

We will see how we can set Firefox profile manually and then call in code or directly we can set the Firefox profile in code itself.


  • First, exit from firefox browser, it it’s opened. File -> Exit,
  • In windows, Start -> Run, enter firefox -p,
  • Create a new profile, name it anything (let’s say MyFFProfile)
  • Select  MyFFProfile and click on “Start Firefox”
  • Now you can set the firefox configurations like, set homepage, download path, Themes etc

Now we will see how we can use this particular above profile in Selenium

Through Code:

There are browser Preferences like set download path. set language etc… we can set in profile.

Note: To get the list of firefox preferences, open firefox browser and type “about:config” in browser url and press enter.

Let’s see the implementation

Read desiredCapabilities in selenium for more information.


Content posted is based on learning or working experience,
Share the post with others if find useful,
Any queries?, leave comments or discuss on our, Thanks!

2 Responses

  1. July 13, 2016

    […] setPreferences for […]

  2. July 20, 2016

    […] firefox profile and it’s preferences for more […]

Leave a Reply

Your email address will not be published. Required fields are marked *