title: Selenium Open Local Files
body: <p>I am attempting to use a Firefox/Selenium instance as a rudimentary slideshow for images.  The idea is that I will open a <code>webdriver</code> and <code>driver.get()</code> files from a local directory.</p>
  
  <p>When I run the following, I receive an error:
  <code>selenium.common.exceptions.WebDriverException: Message: Tried to run command without establishing a connection</code></p>
  
  <p>My assumption is that selenium is attempting to test the next <code>driver.get()</code> request and is not allowing a local, non web-connected, connection is there a way to bypass this behavior?  My code example appears below:</p>
  
  <pre><code>from selenium import webdriver
  import time
  from os import listdir
  from selenium.common.exceptions import WebDriverException
  
  driver = webdriver.Firefox()
  
  image_source = '/home/pi/Desktop/slideshow/photo_frames/daniel/images/'
  
  for file in listdir(image_source):
      if file.endswith('jpg'):
          file_name = image_source + file
          driver.get(file_name)
          time.sleep(5)
  </code></pre>
  
  <p>As always, any help would be greatly appreciated.</p>
  
  <p>UPDATE:
  I should add that the same basic script structure works for websites - I can loop through several websites without any errors.</p>