补充:直接在 REPL 中执行也是报错,确定是回复中说的 devtool 问题?
> const wd = require('wd');
TypeError: Identifier 'wd' has already been declared
at repl:1:1
at REPLServer.defaultEval (repl.js:262:27)
at bound (domain.js:287:14)
at REPLServer.runBound [as eval] (domain.js:300:12)
at REPLServer.<anonymous> (repl.js:431:12)
at emitOne (events.js:82:20)
at REPLServer.emit (events.js:169:7)
at REPLServer.Interface._onLine (readline.js:211:10)
at REPLServer.Interface._line (readline.js:550:8)
at REPLServer.Interface._ttyWrite (readline.js:827:14)
MAC 安装完毕 devtool 后,启动 devtool,
cd macaca-ios-test-sample
devtool
然后界面中输入第一行指令就出错,devtool 中指令:
const wd = require('wd');
报错内容为:
module.js:442 Uncaught Error: Cannot find module 'wd'(…)
还请问下是什么原因?我看截图是 top frame,装好后只能选 top,不知道是否和这个有关
在安装完 macaca android 版本并成功运行用例的情况下,使用指令'npm i app-inspector -g'安装报错,提示如下。设备为 win 10 32 位:
C:\Users\client>npm i app-inspector -g
npm WARN deprecated win-spawn@2.0.0: use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) or [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) instead.
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
> webdriveragent@1.0.16 install C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\webdriveragent
> unzip -o ./WebDriverAgent.zip -d ./ 1>/dev/null
|系统找不到指定的路径。
> uiautomator-client@1.0.16 install C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client
> node ./scripts/build.js
JAVA_HOME is set to D:\Program Files\Java\jdk1.8.0_72
Updated
file C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client\build.xml
Buildfile: C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client\build.xml
-check-env:
[checkenv] Android SDK Tools Revision 25.1.7
[checkenv] Installed at D:\SoftWare\Develop\Android\SDK-build-setup:
[getbuildtools] Using latest Build Tools: 24.0.1
[echo] Resolving Build Target for uiautomator-bootstrap...
[getuitarget] Project Target: Android 6.0
[getuitarget] API level: 23
[echo] ----------
[echo] Creating output directories if needed...
[mkdir] Created dir: C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client\bin
[mkdir] Created dir: C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client\bin\classes-pre-compile:compile:
[javac] Compiling 18 source files to C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client\bin\classes
[javac] ����: [options] Դֵ1.5�ѹ�ʱ, ����δ�����з��а���ɾ��
[javac] ����: [options] Ŀ��ֵ1.5�ѹ�ʱ, ����δ�����з��а���ɾ�� [javac] ����: [options] Ҫ�����й��ѹ�ʱѡ���ľ���, ��ʹ�� -Xlint:-options��
[javac] 3 �����
�
-post-compile:
-dex:
[dex] input: C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client\bin\classes
[dex] Converting compiled files and external libraries into C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client\bin\classes.dex...
-post-dex:
-jar:
[jar] Building jar: C:\Users\client\AppData\Roaming\npm\node_modules\app-inspector\node_modules\uiautomator-client\bin\uiautomator-bootstrap.jar
-post-jar:
build:
BUILD SUCCESSFULTotal time: 6 seconds
uiautomator-bootstrap build success!
npm WARN optional dep failed, continuing fsevents@1.0.14
npm WARN deprecated minimatch@2.0.10: Please update to minimatch 3.0.2 or higher to avoid a RegExp DoS issue
npm ERR! Windows_NT 10.0.10240
npm ERR! argv "C:\\Program Files\\nodejs\\node.exe" "C:\\Program Files\\nodejs\\node_modules\\npm\\bin\\npm-cli.js" "i" "app-inspector" "-g"
npm ERR! node v4.4.7
npm ERR! npm v2.15.8
npm ERR! code ELIFECYCLE
npm ERR! webdriveragent@1.0.16 install: `unzip -o ./WebDriverAgent.zip -d ./ 1>/dev/null`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the webdriveragent@1.0.16 install script 'unzip -o ./WebDriverAgent.zip -d ./ 1>/dev/null'.
npm ERR! This is most likely a problem with the webdriveragent package,
npm ERR! not with npm itself.
npm ERR! Tell the author that this fails on your system:
npm ERR! unzip -o ./WebDriverAgent.zip -d ./ 1>/dev/null
npm ERR! You can get information on how to open an issue for this project with:
npm ERR! npm bugs webdriveragent
npm ERR! Or if that isn't available, you can get their info via:
npm ERR!
npm ERR! npm owner ls webdriveragent
npm ERR! There is likely additional logging output above.
npm ERR! Please include the following file with any support request:
npm ERR! C:\Users\client\npm-debug.log
大神,fir.im 又无法登陆了,直接报 Internal Server Error,请尽快修复。
必须支持,313077271 期待中
大侠,东西很棒!但有个问题,长时间运行后,整个 mac 都变得好卡,这块能否在最新的版本中解决下?
#123 楼 @vigossjjj 首先感谢楼主的工作!对于参数-t 不是太明白,试了几次,当不指定-t 时,每次执行,从开始到结束一般也就 40s,指定-t 500,发现也是 40s 左右旧结束了,请指点