【发布时间】:2016-03-31 04:23:15
【问题描述】:
我正在尝试使用 splinter 来测试我的 webapp。当我尝试执行以下操作时
>>> from splinter import Browser
>>> browser = Browser()
我收到此错误。我一直在环顾四周,但我不确定如何解决。 有人可以告诉我如何解决这个问题吗?
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/danny/anaconda/lib/python2.7/site-packages/splinter/browser.py", line 63, in Browser
return driver(*args, **kwargs)
File "/Users/danny/anaconda/lib/python2.7/site-packages/splinter/driver/webdriver/firefox.py", line 39, in __init__
self.driver = Firefox(firefox_profile)
File "/Users/danny/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 103, in __init__
self.binary, timeout)
File "/Users/danny/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 51, in __init__
self.binary.launch_browser(self.profile, timeout=timeout)
File "/Users/danny/anaconda/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 "/Users/danny/anaconda/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 90, in _start_from_profile_path
env=self._firefox_env)
File "/Users/danny/anaconda/lib/python2.7/subprocess.py", line 710, in __init__
errread, errwrite)
File "/Users/danny/anaconda/lib/python2.7/subprocess.py", line 1335, in _execute_child
raise child_exception
【问题讨论】:
-
这是完整的调用堆栈吗?我没有看到实际的错误消息。
-
对不起,最后一行是:OSError: [Errno 2] No such file or directory
-
谢谢大家,我有时候很傻