Macaca 问个 macaca 官网 API 是否同步的问题

ruru · 发布于 2017年03月20日 · 最后由 lin8090 回复于 2017年03月28日 · 604 次阅读

我最近在写macaca自动化测试, 参考的API是https://macacajs.github.io/wd.java/

引入的macaca版本是:

<dependency>
    <groupId>macaca.webdriver.client</groupId>
    <artifactId>macacaclient</artifactId>
    <version>2.0.4</version>
</dependency>

问题: 我查看了macacaclient版本的源代码和https://macacajs.github.io/wd.java/ 这里的API差距很大呀

@xdf

共收到 5 条回复
10466

官网已经更新API doc地址 url后面需要追加一个参数,请访问:https://macacajs.github.io/wd.java/?asdfasdfa=adsfasd

2457

有缓存,麻烦清一下

3719

@xdf 感谢感谢

96

@xdf 怎么安装不了安卓的驱动,

而用命令npm install macaca-android -g安装总是提示
[javac] Compiling 11 source files to /usr/local/lib/node_modules/macaca-android/node_modules/android-unicode/bin/classes
[javac] 注: /usr/local/lib/node_modules/macaca-android/node_modules/android-unicode/src/macaca/unicode/ime/charsetUtils/CharsetProvider.java使用了未经检查或不安全的操作。

[javac] 注: 有关详细信息, 请使用 -Xlint:unchecked 重新编译。

-post-compile:

-obfuscate:
-dex:

[dex] input: /usr/local/lib/node_modules/macaca-android/node_modules/android-unicode/bin/classes
[dex] Converting compiled files and external libraries into /usr/local/lib/node_modules/macaca-android/node_modules/android-unicode/bin/classes.dex...

[dx] Exception in thread "main" java.lang.UnsupportedClassVersionError: com/android/dx/command/Main : Unsupported major.minor version 52.0
[dx] at java.lang.ClassLoader.defineClass1(Native Method)
[dx] at java.lang.ClassLoader.defineClass(ClassLoader.java:800)
[dx] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
[dx] at java.net.URLClassLoader.defineClass(URLClassLoader.java:449)
[dx] at java.net.URLClassLoader.access$100(URLClassLoader.java:71)

[dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
[dx] at java.net.URLClassLoader$1.run(URLClassLoader.java:355)

[dx] at java.security.AccessController.doPrivileged(Native Method)
[dx] at java.net.URLClassLoader.findClass(URLClassLoader.java:354)

[dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
[dx] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)

[dx] at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
[dx] at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:482)
BUILD FAILED
/Users/lizhifm/Documents/android_sdk/tools/ant/build.xml:888: The following error occurred while executing this line:
/Users/lizhifm/Documents/android_sdk/tools/ant/build.xml:890: The following error occurred while executing this line:
/Users/lizhifm/Documents/android_sdk/tools/ant/build.xml:902: The following error occurred while executing this line:
/Users/lizhifm/Documents/android_sdk/tools/ant/build.xml:283: null returned: 1

Total time: 7 seconds
Error: build failed
at ChildProcess. (/usr/local/lib/node_modules/macaca-android/node_modules/ant-build/lib/ant-build.js:111:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
/usr/local/lib/node_modules/macaca-android/node_modules/android-unicode/script/build.js:15
throw e;
^

Error: build failed
at ChildProcess. (/usr/local/lib/node_modules/macaca-android/node_modules/ant-build/lib/ant-build.js:111:16)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at Process.ChildProcess._handle.onexit (internal/child_process.js:215:12)
/usr/local/lib
└── (empty)

npm ERR! Darwin 16.4.0
npm ERR! argv "/usr/local/bin/node" "/usr/local/bin/npm" "install" "macaca-android" "-g"
npm ERR! node v6.10.0
npm ERR! npm v3.10.10
npm ERR! code ELIFECYCLE

npm ERR! android-unicode@1.0.11 install: node ./script/build.js
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the android-unicode@1.0.11 install script 'node ./script/build.js'.
npm ERR! Make sure you have the latest version of node.js and npm installed.
npm ERR! If you do, this is most likely a problem with the android-unicode package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! node ./script/build.js
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs android-unicode
npm ERR! Or if that isn't available, you can get their info via:
npm ERR! npm owner ls android-unicode
npm ERR! There is likely additional logging output above.

npm ERR! Please include the following file with any support request:
npm ERR! /Users/lizhifm/Documents/npm-debug.log
npm ERR! code 1

我手动下载安卓后,
Installed driver list:
android: 1.1.30 [out-of-date]

96

麻烦大神有空解答下,下载ios的官网例子已经可以跑起来了,就差安卓了

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册