Firefox Profile in Selenium WebDriver: Welcome to another new post of Selenium WebDriver tutorial series, where we are going to 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 using this feature, we can set as per our automation requirement.
Why 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, then its advisable to run an automation script in a separate firefox profile.
How to Find your Profile?
You can locate your profile on local pc that depends on your operating system, Here below we have shared the location according to the OS
|Operating System||Profile Folder Path|
|Windows XP / 2000 / Vista / 7||%AppData%MozillaFirefoxProfilesxxxxxxxx.default|
|Mac OS X||~/Library/Application/Support/Firefox/Profiles/xxxxxxxx.default/|
How to Create a Firefox Profile?
Creating a new firefox profile and use that in your automation script needs three steps process, That 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 and then choose and run.
- Type “firefox.exe -p'” and click ok
After click ok, you may get another new window name, profile manager. If you can’t see, then sometimes it’s running in the background.SO you need to close properly, or for close completely, you can use CTRL+ALT+DEL. If it still does not open, then you have to 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
Leave a Reply