node.js - 前端测试(UI Recorder)webdriver启动firefox报错
问题描述
刚接触前端自动化测试,研究了下Selenium和Macaca,然后发现了阿里的UI Recorder,chrome和ie下载了对应的webdriver,运行成功,只有firefox失败。找了半天说是没有安装到默认路径,网上的解决方案是java的,这种情况该怎么配置?
15:28:38.967 INFO - Executing: [new session: Capabilities [{ie.ensureCleanSession=true, hosts=, browserName=firefox, platform=ANY}]])15:28:38.969 INFO - Creating a new session for Capabilities [{ie.ensureCleanSession=true, hosts=, browserName=firefox, platform=ANY}]15:28:38.970 WARN - Exception thrownjava.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetExceptionBuild info: version: ’3.0.0’, revision: ’350cf60’, time: ’2016-10-13 10:48:16 -0700’System info: host: ’swj-PC’, ip: ’10.0.0.200’, os.name: ’Windows 7’, os.arch: ’amd64’, os.version: ’6.1’, java.version: ’1.8.0_60’Driver info: driver.version: unknownat java.util.concurrent.FutureTask.report(Unknown Source)at java.util.concurrent.FutureTask.get(Unknown Source)at org.openqa.selenium.remote.server.DefaultSession.execute(DefaultSession.java:183)at org.openqa.selenium.remote.server.DefaultSession.<init>(DefaultSession.java:119)at org.openqa.selenium.remote.server.DefaultSession.createSession(DefaultSession.java:95)at org.openqa.selenium.remote.server.DefaultDriverSessions.newSession(DefaultDriverSessions.java:131)at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:59)at org.openqa.selenium.remote.server.handler.NewSession.handle(NewSession.java:36)at org.openqa.selenium.remote.server.rest.ResultConfig.handle(ResultConfig.java:111)at org.openqa.selenium.remote.server.JsonHttpCommandHandler.handleRequest(JsonHttpCommandHandler.java:189)at org.openqa.selenium.remote.server.DriverServlet.handleRequest(DriverServlet.java:222)at org.openqa.selenium.remote.server.DriverServlet.doPost(DriverServlet.java:184)at javax.servlet.http.HttpServlet.service(HttpServlet.java:707)at org.openqa.selenium.remote.server.DriverServlet.service(DriverServlet.java:150)at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)at org.seleniumhq.jetty9.servlet.ServletHolder.handle(ServletHolder.java:808)at org.seleniumhq.jetty9.servlet.ServletHandler.doHandle(ServletHandler.java:587)at org.seleniumhq.jetty9.server.handler.ContextHandler.doHandle(ContextHandler.java:1127)at org.seleniumhq.jetty9.servlet.ServletHandler.doScope(ServletHandler.java:515)at org.seleniumhq.jetty9.server.handler.ContextHandler.doScope(ContextHandler.java:1061)at org.seleniumhq.jetty9.server.handler.ScopedHandler.handle(ScopedHandler.java:141)at org.seleniumhq.jetty9.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)at org.seleniumhq.jetty9.server.Server.handle(Server.java:499)at org.seleniumhq.jetty9.server.HttpChannel.handle(HttpChannel.java:310)at org.seleniumhq.jetty9.server.HttpConnection.onFillable(HttpConnection.java:257)at org.seleniumhq.jetty9.io.AbstractConnection$2.run(AbstractConnection.java:540)at org.seleniumhq.jetty9.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:635)at org.seleniumhq.jetty9.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:555)at java.lang.Thread.run(Unknown Source)Caused by: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetExceptionBuild info: version: ’3.0.0’, revision: ’350cf60’, time: ’2016-10-13 10:48:16 -0700’System info: host: ’swj-PC’, ip: ’10.0.0.200’, os.name: ’Windows 7’, os.arch: ’amd64’, os.version: ’6.1’, java.version: ’1.8.0_60’Driver info: driver.version: unknownat org.openqa.selenium.remote.server.FirefoxDriverProvider.callConstructor(FirefoxDriverProvider.java:96)at org.openqa.selenium.remote.server.FirefoxDriverProvider.newInstance(FirefoxDriverProvider.java:64)at org.openqa.selenium.remote.server.DefaultDriverFactory.newInstance(DefaultDriverFactory.java:60)at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:222)at org.openqa.selenium.remote.server.DefaultSession$BrowserCreator.call(DefaultSession.java:209)at java.util.concurrent.FutureTask.run(Unknown Source)at org.openqa.selenium.remote.server.DefaultSession$1.run(DefaultSession.java:176)at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)... 1 moreCaused by: java.lang.reflect.InvocationTargetExceptionat sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)at java.lang.reflect.Constructor.newInstance(Unknown Source)at org.openqa.selenium.remote.server.FirefoxDriverProvider.callConstructor(FirefoxDriverProvider.java:86)... 9 moreCaused by: org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTABuild info: version: ’3.0.0’, revision: ’350cf60’, time: ’2016-10-13 10:48:16 -0700’System info: host: ’swj-PC’, ip: ’10.0.0.200’, os.name: ’Windows 7’, os.arch: ’amd64’, os.version: ’6.1’, java.version: ’1.8.0_60’Driver info: driver.version: FirefoxDriverat org.openqa.selenium.firefox.internal.Executable.<init>(Executable.java:75)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.getBinary(FirefoxDriver.java:234)at org.openqa.selenium.firefox.FirefoxDriver.<init>(FirefoxDriver.java:135)... 14 more15:28:38.972 WARN - Exception: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTABuild info: version: ’3.0.0’, revision: ’350cf60’, time: ’2016-10-13 10:48:16 -0700’System info: host: ’swj-PC’, ip: ’10.0.0.200’, os.name: ’Windows 7’, os.arch: ’amd64’, os.version: ’6.1’, java.version: ’1.8.0_60’Driver info: driver.version: FirefoxDriver
问题解答
回答1:关于macaca的文章可以看下我写的文章:
使用macaca进行hybird测试
相关文章:
1. html5 - 百度Ueditor代码高亮和代码段滚动条冲突是怎么回事?2. javascript - vue 数据更新了。但是dom没有更新,,,,,如图3. debian - docker依赖的aufs-tools源码哪里可以找到啊?4. javascript - 读取页面源码,页面中所有的换行都被当成<br/>读取出来 了,,求解应该怎么让它被正确的解析5. javascript - 关于一段 for 循环代码执行顺序的问题6. javascript - 静态页面引公共头尾文件,js怎么写吖?7. docker api 开发的端口怎么获取?8. java - 3个dao的数据根据请求参数选择一个映射到一个url上,怎么写比较好?9. java - 为什么要将Runnable接口的子类对象传递给Thread的构造函数?10. javascript - HTML 原生js怎么控制table根据0,1值来显示或者隐藏