2014-09-03 30 views
1

我試圖按照教程上http://killer-web-development.com/section/4/3 和我遇到的錯誤消息:硒和web2py中不起作用

====================================================================== 
ERROR: setUpClass (test_static_pages.TestHomePage) 
---------------------------------------------------------------------- 
Traceback (most recent call last): 
    File "/Applications/web2py.app/Contents/Resources/applications/tukker/functional_tests.py", line 18, in setUpClass 
    self.browser = webdriver.Firefox() 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/firefox/webdriver.py", line 51, in __init__ 
    self.binary, timeout), 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/firefox/extension_connection.py", line 46, in __init__ 
    self.binary.launch_browser(self.profile) 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 44, in launch_browser 
    self._wait_until_connectable() 
    File "/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/selenium/webdriver/firefox/firefox_binary.py", line 86, in _wait_until_connectable 
    self.profile.path, self._get_firefox_output())) 
WebDriverException: Message: 'Can\'t load the profile. Profile Dir: /tmp/tmpXWOMML Firefox output: 1409783847270\taddons.manager\tDEBUG\tLoaded provider scope for resource://gre/modules/addons/XPIProvider.jsm: ["XPIProvider"]\n1409783847271\taddons.manager\tDEBUG\tLoaded provider scope for resource://gre/modules/LightweightThemeManager.jsm: ["LightweightThemeManager"]\n1409783847272\taddons.xpi\tDEBUG\tstartup\n1409783847273\taddons.xpi\tDEBUG\tSkipping unavailable install location app-system-share\n1409783847283\taddons.xpi\tDEBUG\tcheckForChanges\n1409783847286\taddons.xpi\tDEBUG\tNo changes found\nJavaScript error: chrome://browser/content/urlbarBindings.xml, line 674: aUrl is undefined\n' 

有什麼不對?我在MacOsX maverics上,如果有任何幫助,請使用macports安裝selenium。

+0

其中硒和Firefox版本你有安裝? – alecxe 2014-09-03 22:46:32

+0

Firefox 31.0,硒2.21.2_0 – Sleepyhead 2014-09-03 22:47:27

回答