title: Selenium, how to start Firefox with addons?
body: <p>I want to load the Firefox Addon RequestPolicy. This is how i tried it:</p>
  
  <pre><code>rp = open(wd + "/requestpolicy.xpi")
  firefoxProfile = FirefoxProfile()
  firefoxProfile.add_extension(rp)
  
  self.driver = webdriver.Firefox(firefoxProfile)
  
  self.usr = user.User(self.driver, username, password, world)
  self.usr.login()
  </code></pre>
  
  <p>No error, <a href="http://code.google.com/p/selenium/wiki/FirefoxDriver#Running_with_firebug" rel="noreferrer">according to the Docs</a> it should work, but it doesn't, it still starts without the addon.</p>
  
  <p>Next thing i've tried is calling it this way:</p>
  
  <pre><code>self.driver = webdriver.Firefox(browser_profile=firefoxProfile)
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>TypeError: __init__() got an unexpected keyword argument 'browser_profile'
  </code></pre>
  
  <p>But this is an aspect of python i dont know much about. I got that idea because the <a href="http://code.google.com/p/selenium/source/browse/trunk/py/selenium/webdriver/remote/webdriver.py" rel="noreferrer">source</a> looks that way.</p>