0
スクリプトは次のとおりです。なぜこのシンプルなサンプルをセレンで実行できないのですか?
from selenium import webdriver
driver = webdriver.Firefox()
driver.get("http://www.python.org")
、これが出てくる:
/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/bin/python2.7 /Users/GeniusV/Documents/pythonProject/untitled/hj.py
Traceback (most recent call last):
File "/Users/GeniusV/Documents/pythonProject/untitled/hj.py", line 5, in <module>
driver = webdriver.Firefox()
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 103, in __init__
self.binary, timeout)
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 67, in launch_browser
self._start_from_profile_path(self.profile.path)
File "/usr/local/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 90, in _start_from_profile_path
env=self._firefox_env)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/usr/local/Cellar/python/2.7.11/Frameworks/Python.framework/Versions/2.7/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
OSError: [Errno 2] No such file or directory
、それは私のPythonやセレンの問題である理由私は本当に理解していませんか?
ありがとう、私はFirefoxを再インストールし、それは動作します。 – Daniel