Running Selenium Server Using Custom Firefox Profile

Running Selenium Server Using Custom Firefox Profile

Let’s create custom firefox profile at first:

1. Close all running copies of firefox
2. Start => Run
3. Type firefox.exe -ProfileManager -no-remote, other often offer to run command firefox.exe -ProfileManager, but it not worked for me because of the configuration of the system, but with the key -no-remote it should work 100%
4. In the window that opens, click Create. Read the instructions and click Next
6. Specify the profile name, location and click Finish
7. Profile was created
8. Select the profile you just created
9. Set option Don’t ask at startup
10. Run firefox by pressing Start Firefox



Next configure Firefox as you like. I have done the following:

• Removed menu bar, navigation bar and bookmarks bar
• Established a blank page as your home page
• Turned off the pop-up blocker option and automatic loading of images on Content tab
• On the Privacy tab disabled history remembering
• Disabled all warnings and interlocks on the Security tab
• On the Advanced tab disabled checking spelling, sending notices, check for updates

Then I installed necessary add-ons:

  • Adblock+
  • Flashblock

Then went to about:config and:

  • Changed browser.sessionhistory.max_total_viewers value to 0

RAM / Number of pages
32 Mb …….. 0
64 Mb …….. 1
128 Mb …… 2
256 Mb …… 3
512 Mb …… 5
1 Gb ……… 8
2 Gb ……… 8
4 Gb ……… 8

  • Accelerated rendering by adding nglayout.initialpaint.del property with value 0
  • Turned off remembering of last opened tabs

browser.sessionstore.max_windows_undo -> 0
browser.sessionstore.resume_session_once -> false
browser.sessionstore.resume_from_crash -> false


  • Turned off geolocation geo.enabled -> false
  • Turned off favorites saving browser.bookmarks.max_backups -> 0
  • Turned off the saving of back-ups for Adblock+ extensions.adblockplus.patternsbackups -> 0
  • Disabled the ability to play gif-animation image.animation_mode -> none
  • Disabled favicons

browser.chrome.site_icons -> false
browser.chrome.favicons -> false

In general, my customization has ended.

To run the selenium server using firefox  with customized profile, you must add to your startup file a parameter -firefoxProfileTemplate and after parameter add the path to the profile. Note that, for example, in Windows 7 you can find two paths to the default profile

  • C:\Users\Username\AppData\Local\Mozilla\Firefox\Profiles\
  • C:\Users\Username\AppData\Roaming\Mozilla\Firefox\Profiles\

we need Roaming, so as a result in startup file we will see
java -jar selenium-server.jar -firefoxProfileTemplate C:\Users\Username\AppData\Roaming\Mozilla\Firefox\Profiles\custom_profile

Or in case of spaces  in the path it should be placed in quotes
java -jar selenium-server.jar -firefoxProfileTemplate “C:\Documents and Settings\Username\AppData\Roaming\Mozilla\Firefox\Profiles\custom_profile”

In fine we get a little faster browser  with the necessary settings for you .

Also we offer our clients QA automation with Selenium framework. Selenium is a powerful set of tools, focusing on the rapid development of automation scripts for Web applications.

You may manage your subscription options from your profile.

Knowledge Center
Knowledge Center
Subscribe

*- required fields