title: Unable to load existing firefox profile with selenium 4's option.set_preference in python
body: <p>I have this code that works and loads the firefox profile</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.firefox.options import Options
  from selenium.webdriver.firefox.firefox_profile import FirefoxProfile
  
  
  ffOptions = Options()
  ffProfile = FirefoxProfile(r'C:\Users\Tyler\AppData\Roaming\Mozilla\Firefox\Profiles\0753x1pz.default')
  ffOptions.profile = ffProfile
  
  driver = webdriver.Firefox(options=ffOptions)
  driver.get(&quot;http://www.google.com&quot;)
  </code></pre>
  <p>Only it gives the following deprecation warnings:</p>
  <blockquote>
  <p>firefox_profile has been deprecated, please use an Options object</p>
  </blockquote>
  <blockquote>
  <p>Setting a profile has been deprecated. Please use the set_preference
  and install_addons methods</p>
  </blockquote>
  <p>To resolve the warnings I've tried updating my code to</p>
  <pre><code>from selenium import webdriver
  from selenium.webdriver.firefox.options import Options
  
  
  ffOptions = Options()
  ffOptions.set_preference('profile', r'C:\Users\Tyler\AppData\Roaming\Mozilla\Firefox\Profiles\0753x1pz.default')
      
  driver = webdriver.Firefox(options=ffOptions)
  driver.get(&quot;http://www.google.com&quot;)
  </code></pre>
  <p>Now there are no warnings but the profile is not set when the browser opens, it's a blank profile.</p>