前提:
已经正确安装了 macaca-android@2.0.2
已经可以正常使用 app-inspector
使用 macaca doctor 检查已经没有异常!
1.录制
不能像以前那样录制 xpath,现在录制出来的都是 坐标!
输入中文会报错!
如:
tap: 653, 128
✓ 执行成功
sendKeys: 瓜子
✖ 执行失败 An unknown server-side error occurred while processing the command.
macaca server 运行日志:
>> responseHandler.js:11:12 [master] pid:2384 Recieve HTTP Request from Client[2017-05-12 09:50:22]: method: POST url: /wd/hub/session/eb7e9122-ca9f-4609-b254-e0a63e7ea136/keys, jsonBody: {"value":["瓜","子"]}
>> proxy.js:54:14 [master] pid:2384 Proxy: /wd/hub/session/eb7e9122-ca9f-4609-b254-e0a63e7ea136/keys:POST to http://127.0.0.1:9001/wd/hub/session/eb7e9122-ca9f-4609-b254-e0a63e7ea136/keys:POST with body: {"value":["瓜","子"]}
>> proxy.js:82:20 [master] pid:2384 Got response with status 200: {"status":13,"value":"An unknown server-side error occurred while processing the command.","sessionId":"eb7e9122-ca9f-4609-b254-e0a63e7ea136"}
>> session.js:107:14 [master] pid:2384 Send HTTP Respone to Client[2017-05-12 09:50:22]: {"status":13,"value":"\"An unknown server-side error occurred while processing the command.\"","sessionId":"eb7e9122-ca9f-4609-b254-e0a63e7ea136"}
>> responseHandler.js:11:12 [master] pid:2384 Recieve HTTP Request from Client[2017-05-12 09:50:22]: method: GET url: /wd/hub/session/eb7e9122-ca9f-4609-b254-e0a63e7ea136/screenshot, jsonBody: {}
2.回放
以前使用 xpath 定位的用例全部报错!
1) commons/commons : f4301fe8 场景合集:基础功能页面遍历 场景集:登录前 场景:定位地址切换 点击: 首页:
Error: the string "Wait elelment displayed timeout: //*[@text=\"首页\"] ,10000ms" was thrown, throw an Error :)
at process._tickCallback (internal/process/next_tick.js:103:7)