diff --git a/py/selenium/webdriver/firefox/firefox_binary.py b/py/selenium/webdriver/firefox/firefox_binary.py
index <HASH>..<HASH> 100644
--- a/py/selenium/webdriver/firefox/firefox_binary.py
+++ b/py/selenium/webdriver/firefox/firefox_binary.py
@@ -132,6 +132,6 @@ class FirefoxBinary(object):
         """Returns the fully qualified path by searching Path of the given name"""
         for pe in os.environ['PATH'].split(os.pathsep):
             checkname = os.path.join(pe, fname)
-            if os.access(checkname, os.X_OK):
+            if os.access(checkname, os.X_OK) and not os.path.isdir(checkname):
                 return checkname
         return None
DavidBurns, on behalf of AndiAlbrecht, fixing where which finds directories. Fixes issue <I>

r<I>