我已经通过webdriver命令行打开了firefox,当我尝试浏览firefox中的页面时,它只是崩溃了。
>>> from selenium import webdriver
>>> from selenium.common.exceptions import NoSuchElementException
>>> from selenium.webdriver.common.keys import Keys
>>> import time
>>>
>>> browser = webdriver.Firefox() # Get local session of firefox
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Python/2.7/site-packages/selenium-2.26.0-py2.7.egg/selenium/webdriver/firefox/webdriver.py", line 59, in __init__
self.binary, timeout),
File "/Library/Python/2.7/site-packages/selenium-2.26.0-py2.7.egg/selenium/webdriver/firefox/extension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "/Library/Python/2.7/site-packages/selenium-2.26.0-py2.7.egg/selenium/webdriver/firefox/firefox_binary.py", line 44, in launch_browser
self._wait_until_connectable()
File "/Library/Python/2.7/site-packages/selenium-2.26.0-py2.7.egg/selenium/webdriver/firefox/firefox_binary.py", line 86, in _wait_until_connectable
self.profile.path, self._get_firefox_output()))
selenium.common.exceptions.WebDriverException: Message: "Can't load the profile. Profile Dir: /tmp/tmpcH5K1j Firefox output: *** LOG addons.xpi: startup\n*** LOG addons.xpi: Skipping unavailable install location app-system-share\n*** LOG addons.xpi: checkForChanges\n*** LOG addons.xpi: No changes found\n2013-06-25 08:39:00.213 firefox-bin[7232:707] invalid drawable\n*** Blocklist::_loadBlocklistFromFile: blocklist is disabled\n"