Appium [求助] Appium 某些页面上查找控件时间太长

ghost · 2016年12月06日 · 最后由 smeil 回复于 2021年05月12日 · 1799 次阅读

最近使用 Appium 做一些 Android UI 自动化,发现一些页面的控件查找等操作都非常费时间,查找要 20 秒,执行 click 操作要 10 秒。页面本身也不复杂,没有很多控件。请问有没有遇到过类似情况的,是什么原因呢?谢谢!

Appium 版本 1.4.13 OSX 版

下面是 Appium 的日志:

info: --> POST /wd/hub/session/74dd67e4-acaa-4b2f-ae6b-143396516d38/element {"using":"name","sessionId":"74dd67e4-acaa-4b2f-ae6b-143396516d38","value":"1"}
info: [debug] Waiting up to 0ms for condition
info: [debug] Pushing command to appium work queue: ["find",{"strategy":"name","selector":"1","context":"","multiple":false}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"name","selector":"1","context":"","multiple":false}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: find
info: [debug] [BOOTSTRAP] [debug] Finding 1 using NAME with the contextId: multiple: false
info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[DESCRIPTION=1, INSTANCE=0]

info: [debug] [BOOTSTRAP] [debug] Using: UiSelector[TEXT=1, INSTANCE=0]

info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":{"ELEMENT":"10"}}

info: [debug] Responding to client with success: {"status":0,"value":{"ELEMENT":"10"},"sessionId":"74dd67e4-acaa-4b2f-ae6b-143396516d38"}
info: <-- POST /wd/hub/session/74dd67e4-acaa-4b2f-ae6b-143396516d38/element 200 20140.723 ms - 88 {"status":0,"value":{"ELEMENT":"10"},"sessionId":"74dd67e4-acaa-4b2f-ae6b-143396516d38"}

info: --> POST /wd/hub/session/74dd67e4-acaa-4b2f-ae6b-143396516d38/element/10/click {"sessionId":"74dd67e4-acaa-4b2f-ae6b-143396516d38","id":"10"}
info: [debug] Pushing command to appium work queue: ["element:click",{"elementId":"10"}]
info: [debug] [BOOTSTRAP] [debug] Got data from client: {"cmd":"action","action":"element:click","params":{"elementId":"10"}}
info: [debug] [BOOTSTRAP] [debug] Got command of type ACTION
info: [debug] [BOOTSTRAP] [debug] Got command action: click

info: [debug] [BOOTSTRAP] [debug] Returning result: {"status":0,"value":true}

info: [debug] Responding to client with success: {"status":0,"value":true,"sessionId":"74dd67e4-acaa-4b2f-ae6b-143396516d38"}
info: <-- POST /wd/hub/session/74dd67e4-acaa-4b2f-ae6b-143396516d38/element/10/click 200 10154.573 ms - 76 {"status":0,"value":true,"sessionId":"74dd67e4-acaa-4b2f-ae6b-143396516d38"}

如果觉得我的文章对您有用,请随意打赏。您的支持将鼓励我继续创作!
共收到 1 条回复 时间 点赞

我也遇到过,你解决了吗

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