How to Create Firefox Profile in Selenium WebDriver

Firefox Profile in Selenium WebDriver: Welcome to another new post of the Selenium WebDriver tutorial series, where we will discuss the Firefox Profile. Firefox Profile stores the settings, add-ons, customization, and other personalization settings, which are done explicitly for the Firefox browser. With this feature, we can set it as per our automation requirement.

Why do we Need a New profile?

Every browser has a default Firefox profile, but that is not automation-friendly, so when you want to run your automation script in a reliable model, it’s advisable to run an automation script in a separate Firefox profile.

How to Find Your Profile?

You can locate your profile on a local PC depending on your operating system; here below, we have shared the location according to the OS

Operating SystemProfile Folder Path
Windows XP / 2000 / Vista / 7 %AppData%MozillaFirefoxProfilesxxxxxxxx.default
Linux ~/.mozilla/firefox/xxxxxxxx.default/
Mac OS X ~/Library/Application/Support/Firefox/Profiles/xxxxxxxx.default/

How to Create a Firefox Profile?

Creating a new Firefox profile and using that in your automation script needs three steps process, Which is

  • Start the Profile Manager
  • Create a new profile
  • Use the Created Profile in Selenium Script

Start the Profile Manager

  • If there is any open Firefox browser, then close that.
  • Open the Run prompt by pressing (Windows + r) or Press the windows, then choose and run.
  • Type “firefox.exe -p'” and click ok.

After clicking ok, you may get another new window name, profile manager. If you can’t see, then sometimes it’s running in the background. So it would be best if you closed properly, or you can use CTRL+ALT+DEL to close completely. If it still does not open, then you need to specify the path of the Firefox program.

On 32-bit: Windows: “C:\Program Files\Mozilla Firefox.exe” –p
On 64-bit: Windows: “C:\Program Files(x86)\Mozilla Firefox.exe” –p

I love open-source technologies and am very passionate about software development. I like to share my knowledge with others, especially on technology that's why I have given all the examples as simple as possible to understand for beginners. All the code posted on my blog is developed, compiled, and tested in my development environment. If you find any mistakes or bugs, Please drop an email to, or You can join me on Linkedin.

Leave a Comment