Python打开火狐浏览器报错,下面是报错信息
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Python打开火狐浏览器报错,下面是报错信息相关的知识,希望对你有一定的参考价值。
Traceback (most recent call last):
File "C:\Python27\Python_daima\qidong.py", line 5, in <module>
wd=webdriver.Firefox()
File "C:\Python27\lib\site-packages\selenium\webdriver\firefox\webdriver.py", line 154, in __init__
keep_alive=True)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 98, in __init__
self.start_session(desired_capabilities, browser_profile)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 185, in start_session
response = self.execute(Command.NEW_SESSION, parameters)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\webdriver.py", line 249, in execute
self.error_handler.check_response(response)
File "C:\Python27\lib\site-packages\selenium\webdriver\remote\errorhandler.py", line 193, in check_response
raise exception_class(message, screen, stacktrace)
WebDriverException: Message: Missing 'marionetteProtocol' field in handshake
selenium 在eclipse中运行打开火狐浏览器报错求大神看一下
Exception in thread "main" java.lang.ExceptionInInitializerError
at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:60)
at org.openqa.selenium.firefox.FirefoxBinary.<init>(FirefoxBinary.java:56)
at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:120)
at domeweb.dakai.main(dakai.java:14)
Caused by: org.openqa.selenium.WebDriverException: 'webdriver.firefox.bin' property set, but unable to locate the requested binary: C:/Program Files (x86)/Mozilla Firefox/firefox.exe
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'ZN8EMML2YBNNREE', ip: '172.16.6.152', os.name: 'Windows 7', os.arch: 'amd64', os.version: '6.1', java.version: '1.8.0_91'
Driver info: driver.version: FirefoxDriver
at org.openqa.selenium.firefox.internal.Executable.locateFirefoxBinaryFromSystemProperty(Executable.java:145)
at org.openqa.selenium.firefox.internal.Executable.<clinit>(Executable.java:45)
... 4 more
以上是关于Python打开火狐浏览器报错,下面是报错信息的主要内容,如果未能解决你的问题,请参考以下文章
在python里用selenium webdriver打开火狐浏览器后总是报错?