title: Selenium Python Firefox webdriver : can't modify profile
body: <p>I want to use, on a webdriver Firefox instance, the  "new tab instead of window" option.
  1/ I created a profile with this option on, but when I use the profile a lot of options are OK but not this one.
  2/ After the load of the profile I tried to change the option in the code but it does n't work.
  My code :</p>
  
  <pre><code>profile = webdriver.FirefoxProfile(os.path.join(s_path, name))
  profile.set_preference("browser.link.open_newwindow.restriction", 0)
  profile.set_preference("browser.link.open_newwindow", 3)
  profile.set_preference("browser.link.open_external", 3)
  profile.set_preference("browser.startup.homepage","http://www.google.fr")
  profile.update_preferences()
  print(os.path.join(s_path, name))
  driver = webdriver.Firefox(set_profile())
  </code></pre>
  
  <p>All is OK (the start homepage is google.fr) except this option which is not OK.</p>
  
  <p>It seems that Selenium copy the profile in a temp dir. where users.js have the wrong line :</p>
  
  <pre><code>user_pref("browser.link.open_newwindow", 2);
  </code></pre>
  
  <p>Python 3.4.2, Windows 7, Firefox 39.0, Selenium lib 2.46 </p>