新手区 用 inspector 无法识别一个 app 界面控件信息 (之前可以识别)

杨豆豆 · 2016年05月19日 · 最后由 Jackney 回复于 2017年03月13日 · 1412 次阅读



.使用 mac 系统,appium 1.4.8 版本,连接安卓真机进行调试
2.测试一个 app,之前可以识别到该界面中的控件信息,现在无法识别,总是报错
下面是错误代码:

info: --> GET /wd/hub/session/1d7b6f31-74f0-4e72-b365-7608f39eea43/source {}

info: [debug] Pushing command to appium work queue: ["source",{}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"source","params":{}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: source

info: [debug] [BOOTSTRAP] [debug] Command returned error:java.lang.RuntimeException: Failed to Dump Window Hierarchy

info: [debug] Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"Failed to Dump Window Hierarchy"},"sessionId":"1d7b6f31-74f0-4e72-b365-7608f39eea43"}

info: <-- GET /wd/hub/session/1d7b6f31-74f0-4e72-b365-7608f39eea43/source 500 93.818 ms - 200
info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":13,"value":"Failed to Dump Window Hierarchy"}

共收到 7 条回复 时间 点赞

我这边打不开,没有 ***,能不能给个解决方法呢,谢谢!

同一个界面,用 uiautomatorviewer 可以获取不?

用 uiautomatorviewer 是可以识别的,可以找到控件信息,但是用 inspector 可以识别出来,但是就是找不到控件信息,之前使用正常,不知道今天做了什么操作导致无法使用?

同样的问题。appium1.3.5 可以看到,但是 source 中的中文都会是'???',appium1.3.7 以上 source 中的中文可以正常显示,但是遇到被测试 app 的某 activity 就出现了楼主的问题,怀疑是中文特殊符号导致。英文 mac 系统,android5.0,真机中文三星 galaxynotes 语言中文,被测试 app 中文版。你提到的 uiautomatorviewer 可以看到,如果你的 mac 系统是英文的,你安装的 sdk 后,用这个 uiautomatorviewer 看到的带中文信息的控件也应该显示 ‘???’ 吧?

安卓中可以输入这样的符号,所以 appium 解析的时候,把这个解析并显示在 source 中,出错了。见图:

@yangmingquan6 请问楼主最终有解决吗?出现同样的问题

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