First selenium program not working
<p>I've just loaded <code>Python</code> <code>Selenium</code> into my <code>Ubuntu</code> system and I'm following the Getting Started tutorial on <a href="http://selenium-python.readthedocs.io/getting-started.html#simple-usage" rel="nofollow">ReadTheDocs</a>.  When I run this program:</p>

<pre><code>from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
driver.get("http://www.python.org")
assert "Python" in driver.title
elem = driver.find_element_by_name("q")
elem.clear()
elem.send_keys("pycon")
elem.send_keys(Keys.RETURN)
assert "No results found." not in driver.page_source
driver.close()
</code></pre>

<p>But I'm getting this error:</p>

<pre><code>Traceback (most recent call last):    
  File "/home/henry/Documents/Scraper/test-selenium.py", line 4, in &lt;module&gt; driver = webdriver.Firefox()    
  File "/usr/local/lib/python2.7/distpackages/selenium/webdriver/firefox/webdriver.py", line 80, in __init__self.binary, timeout)    
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/extension_connection.py", line 52, in __init__self.binary.launch_browser(self.profile, timeout=timeout)    
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 68, in launch_browser self._wait_until_connectable(timeout=timeout)   
  File "/usr/local/lib/python2.7/dist-packages/selenium/webdriver/firefox/firefox_binary.py", line 108, in _wait_until_connectable % (self.profile.path))  
WebDriverException: Message: Can't load the profile. Profile Dir: /tmp/tmp8xr2V3 If you specified a log_file in the FirefoxBinary constructor, check it for details.
</code></pre>

<p>I think you are using selenium 2.53.6</p>

<p>The issue is compatibility of firefox with selenium, since firefox>= 48 need Gecko Driver(<a href="https://github.com/mozilla/geckodriver" rel="nofollow">https://github.com/mozilla/geckodriver</a>) to run testcases on firefox. or you can downgrade the firefox to 46..from this link <a href="https://ftp.mozilla.org/pub/firefox/releases/46.0.1/" rel="nofollow">https://ftp.mozilla.org/pub/firefox/releases/46.0.1/</a> </p>

python python-2.7 selenium