node.js - 前端测试(UI Recorder)webdriver启动firefox报错
ringa_lee
ringa_lee 2017-04-17 15:18:36
0
1
985

刚接触前端自动化测试,研究了下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 thrown
java.util.concurrent.ExecutionException: org.openqa.selenium.WebDriverException: java.lang.reflect.InvocationTargetException
Build 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: unknown
        at 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.InvocationTargetException
Build 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: unknown
        at 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 more
Caused by: java.lang.reflect.InvocationTargetException
        at 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 more
Caused by: org.openqa.selenium.WebDriverException: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA
Build 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
        at 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 more
15:28:38.972 WARN - Exception: Cannot find firefox binary in PATH. Make sure firefox is installed. OS appears to be: VISTA
Build 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
ringa_lee
ringa_lee

ringa_lee

Antworte allen(1)
黄舟

关于macaca的文章可以看下我写的文章:

使用macaca进行hybird测试

Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage