title: Webdriver object has no attribute set_preference error with Firefox Webdriver in Python27 Selenium
body: <p>I'm trying to set preferences in python27 selenium firefox webdriver(because I need it to start with allowed flash), but no example I found seems to work. This is my non working code which works if Im not trying to set preference:</p>
  
  <pre><code>import pyautogui, sys
  import time
  import random
  import subprocess
  from selenium import webdriver
  from selenium.webdriver.firefox.options import Options
  driver = webdriver.Firefox(('C:\\Users\\administrator\\AppData\\Roaming\\Mozilla\\Firefox\\Profiles\\0atm5xlq.default-1401786267631'))
  driver.set_preference("plugin.state.flash", 2)
  </code></pre>