在PATH中找不到firefox二进制文件。确保安装了firefox。操作系统似乎是:MAC

时间:2016-06-28 06:45:55

标签: macos selenium-webdriver

我无法在MAC OS中执行测试。我已经安装了firefox(它在Applications文件夹中)并且我试图为firefox设置二进制路径,我不确定因为我是MAC新手但仍然无法工作..我已经附加了设置firefox二进制文件的截图但我我不确定它是否正确。请提供解决问题的解决方案。

Setting up the firefox binary path in profile

location of firefox

我收到如下错误

Exception in thread "main" org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: MAC
Build info: version: '2.53.0', revision: '35ae25b', time: '2016-03-15 16:57:40'
System info: host: 'ADMINISTRATORs-Mac-mini-2.local', ip: '172.16.105.81', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.9.3', java.version: '1.8.0_91'
Driver info: driver.version: FirefoxDriver
    at org.openqa.selenium.firefox.internal.Executable.<init>(Executable.java:74)
    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 myLearning.firstClass.main(firstClass.java:16)

1 个答案:

答案 0 :(得分:0)

你可以从命令行启动firefox:

<orderby>