解决 WindowsError: [Error 87] 分类: 问题总结 2014-04-09 22:21 1266人阅读 评论(0) 收藏
今天执行b = webdriver.Firefox()是报错。我的是firefox 是19.0版本,selenium是2.37版本。
以下两种情况: A、B,均是因为firefox版本与selenium版本不兼容造成的,在 http://docs.seleniumhq.org/about/platforms.jsp 页面查看selenium支持的firefox版本信息(发现selenium不支持firefox 19.0版本)
A.
Traceback (most recent call last):
File "C:\Users\tomet\Desktop\a.py", line 10, in <module>
b = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 59, in __init__
self.binary, timeout),
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 61, in launch_browser
self._wait_until_connectable()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 105, in _wait_until_connectable
self.profile.path, self._get_firefox_output()))
WebDriverException: Message: "Can't load the profile. Profile Dir: c:\\users\\chengh~1.qun\\appdata\\local\\temp\\tmpqdnfky Firefox output: *** LOG addons.xpi: startup\r\n*** LOG addons.xpi: Skipping unavailable install location app-system-local\r\n*** LOG addons.xpi: Skipping unavailable install location app-system-share\r\n*** LOG addons.xpi: checkForChanges\r\n"
B.
startupinfo() error 87
以下两种情况: A、B,均是因为firefox版本与selenium版本不兼容造成的,在 http://docs.seleniumhq.org/about/platforms.jsp 页面查看selenium支持的firefox版本信息(发现selenium不支持firefox 19.0版本)
A.
Traceback (most recent call last):
File "C:\Users\tomet\Desktop\a.py", line 10, in <module>
b = webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 59, in __init__
self.binary, timeout),
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\extension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 61, in launch_browser
self._wait_until_connectable()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\firefox_binary.py", line 105, in _wait_until_connectable
self.profile.path, self._get_firefox_output()))
WebDriverException: Message: "Can't load the profile. Profile Dir: c:\\users\\chengh~1.qun\\appdata\\local\\temp\\tmpqdnfky Firefox output: *** LOG addons.xpi: startup\r\n*** LOG addons.xpi: Skipping unavailable install location app-system-local\r\n*** LOG addons.xpi: Skipping unavailable install location app-system-share\r\n*** LOG addons.xpi: checkForChanges\r\n"
B.
startupinfo() error 87
版权声明:本文为博主原创文章,未经博主允许不得转载。