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

参考技术A 排除病毒影响后只能考虑网速问题了。建议在晚上11点后上网人数少时尝试,如果问题依旧,考虑重新安装系统。因为多数浏览器都在此问题,所以排除浏览器故障。

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

参考技术A java.lang.ExceptionInInitializerError,这个错误意思是静态初始化程序中发生意外异常的信号。抛出 ExceptionInInitializerError 表明在计算静态初始值或静态变量的初始值期间发生异常。本回答被提问者和网友采纳

以上是关于Python打开火狐浏览器报错,下面是报错信息的主要内容,如果未能解决你的问题,请参考以下文章

selenium启动火狐浏览器打开百度首页,报错

U3D发布WEBGL报错,用的是火狐打开

在python里用selenium webdriver打开火狐浏览器后总是报错?

selenium 在eclipse中运行打开火狐浏览器报错求大神看一下

学习python报错处理

百度地图API功能没问题,火狐浏览器报错,求助