Macaca macaca-android@2.0.2 之后,录制和回放都出了问题--求解

孟德 · 2017年05月12日 · 最后由 dustin 回复于 2017年05月12日 · 2015 次阅读

前提:
已经正确安装了 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)
共收到 1 条回复 时间 点赞

xpath.css 这两种方法不支持。。。但是通过 id 在输入框里输入东西的时候,发现不能完整输入,后面的会把前面的值替换掉。比如:手机号:123456,最后输入框只剩下一个 6

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