title: How to use Firefox profiles in Selenium Python
body: <p>I am playing around with Firefox profiles.<br>
  I tried: </p>
  
  <pre><code>from selenium import webdriver
  fp = webdriver.FirefoxProfile('C:/Users/&lt;user name&gt;/AppData/Roaming/Mozilla/Firefox/Profiles/abc3defghij2.ProfileName')
  driver = webdriver.Firefox(fp)
  driver.get("https://www.example.com/membersarea")
  </code></pre>
  
  <p>As well as</p>
  
  <pre><code>from selenium import webdriver
  from selenium.webdriver.firefox.webdriver import FirefoxProfile
  
  profile = FirefoxProfile('C:/Users/Bain3/AppData/Roaming/Mozilla/Firefox/Profiles/g4sh4k5c.fa')
  driver = webdriver.Firefox('C:/Users/Bain3/AppData/Roaming/Mozilla/Firefox/Profiles/g4sh4k5c.fa')
  driver.get("https://stackoverflow.com/questions/20289598/python-selenium-import-my-regular-firefox-profile-add-ons")
  </code></pre>
  
  <p>This worked.  I then tried to launch it again and now firefox tends to not load any urls.  It seems that now when I use </p>
  
  <pre><code>driver = webdriver.Firefox()
  driver.get('http://stackoverflow.com')
  </code></pre>
  
  <p>This does loads the browser but not the url.<br>
  I think for some reason adding profiles seems to change the directory of geckodriver.  I am using python 3 Anaconda in a virtual env.  Changing the system directory, launching geckodriver and  Anaconda gecko-driver reinstall do not remedy this.
  I thought perhaps changing  <code>driver = webdriver. Firefox(executable_path=r'C:\Users\Bain3\Music\geckodriver.exe')(fp)</code> 
  might help.</p>
  
  <p>Why could I only launch Firefox in a separate profile once and now it simply launches a blank firefox.  No error commands in console it's like it's frozen.</p>
  
  <p>Here's an image of Firefox launching.. <a href="https://ibb.co/nwnkp5" rel="nofollow noreferrer">https://ibb.co/nwnkp5</a></p>
  
  <p>Thanks</p>