-1

I'm facing an issue with selenium with python in Mac OS.. Python 2.7 pydev 3.0

My sample code

from selenium import webdriver
driver = webdriver.Firefox()
driver.get("https://www.formsite.com/")
driver.maximize_window()
driver.close()

Installed selenium using PIP

pip install selenium
Downloading/unpacking selenium
  Downloading selenium-2.44.0.tar.gz (2.6MB): 2.6MB downloaded
  Running setup.py (path:/private/var/folders/qw/ctlmndfd5ts9w2p6v1qc382r0000gn/T/pip_build_bhanusaa/selenium/setup.py) egg_info for package selenium

Installing collected packages: selenium
  Running setup.py install for selenium

Successfully installed selenium

Assigned /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages in Python Path library enter image description here

getting below error

Traceback (most recent call last):
  File "/Users/bhanusaa/Desktop/samp/src/scripts/new.py", line 3, in <module>
    driver = webdriver.Firefox()
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 59, in __init__
    self.binary, timeout),
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
    self.binary.launch_browser(self.profile)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 65, in launch_browser
    self._start_from_profile_path(self.profile.path)
  File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 88, in _start_from_profile_path
    env=self._firefox_env).communicate()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 711, in __init__
    errread, errwrite)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1308, in _execute_child
    raise child_exception
OSError: [Errno 2] No such file or directory
2
  • Please check here for solution : stackoverflow.com/questions/13570003/… Commented Dec 31, 2014 at 10:15
  • the link you provided is about python unittest frame work, (even when i tried the code in the link you had provided results in same error) i'm getting "OSError: [Errno 2] No such file or directory" Commented Dec 31, 2014 at 10:26

1 Answer 1

-1

HI the issue is resolved now, previously i had installed Firefox 34.0 in my Mac and now downgraded to 30.0, now it is working fine.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.