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

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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 表明在计算静态初始值或静态变量的初始值期间发生异常。本回答被提问者和网友采纳

以上是关于selenium 在eclipse中运行打开火狐浏览器报错求大神看一下的主要内容,如果未能解决你的问题,请参考以下文章

如何打开火狐浏览器的selenium

selenium 测试工具只能用在火狐浏览器上吗?

selenium 3.0与2.0 打开火狐浏览器的区别

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

firefox 打开 selenium ide怎么用

用selenium打开了火狐浏览器但是为啥会闪退