今天执行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 ometDesktopa.py", line 10, in <module>
b = webdriver.Firefox()
File "C:Python27libsite-packagesseleniumwebdriverfirefoxwebdriver.py", line 59, in __init__
self.binary, timeout),
File "C:Python27libsite-packagesseleniumwebdriverfirefoxextension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "C:Python27libsite-packagesseleniumwebdriverfirefoxfirefox_binary.py", line 61, in launch_browser
self._wait_until_connectable()
File "C:Python27libsite-packagesseleniumwebdriverfirefoxfirefox_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 *** LOG addons.xpi: Skipping unavailable install location app-system-local *** LOG addons.xpi: Skipping unavailable install location app-system-share *** LOG addons.xpi: checkForChanges "
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 ometDesktopa.py", line 10, in <module>
b = webdriver.Firefox()
File "C:Python27libsite-packagesseleniumwebdriverfirefoxwebdriver.py", line 59, in __init__
self.binary, timeout),
File "C:Python27libsite-packagesseleniumwebdriverfirefoxextension_connection.py", line 47, in __init__
self.binary.launch_browser(self.profile)
File "C:Python27libsite-packagesseleniumwebdriverfirefoxfirefox_binary.py", line 61, in launch_browser
self._wait_until_connectable()
File "C:Python27libsite-packagesseleniumwebdriverfirefoxfirefox_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 *** LOG addons.xpi: Skipping unavailable install location app-system-local *** LOG addons.xpi: Skipping unavailable install location app-system-share *** LOG addons.xpi: checkForChanges "
B.
startupinfo() error 87
版权声明:本文为博主原创文章,未经博主允许不得转载。