appium执行脚本很慢!点击按钮要隔8、9秒间隔!!

lzctest8 2018-04-10 12:33:41
模拟器和真机都一样,登录的时候不慢,就是登录进去后每个元素执行都要8、9秒左右,本以为是xpath定位慢,但换个定位方法还是一样!!我感觉是和appium交互有关系!我的环境是python3.5+appium1.7.1!以下是我的脚本和日志!(本人不会看日志,来大神解答!急求)



[HTTP] --> POST /wd/hub/session/45d30326-3591-4083-8256-1700b3cf9542/element {"value":"//*[@text='您还未绑定设备,请先绑定!']","using":"xpath","sessionId":"45d30326-3591-4083-8256-1700b3cf9542"}
[MJSONWP] Calling AppiumDriver.findElement() with args: ["xpath","//*[@text='您还未绑定设备,请先绑定!']","45d30326-3591-4083-8256-1700b3cf9542"]
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Valid locator strategies for this request: xpath, id, class name, accessibility id, -android uiautomator
[BaseDriver] Waiting up to 10000 ms for condition
[AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//*[@text='您还未绑定设备,请先绑定!']","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//*[@text='您还未绑定设备,请先绑定!']","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//*[@text='您还未绑定设备,请先绑定!']' using 'XPATH' with the contextId: '' multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Failed to locate element. Clearing Accessibility cache and retrying.
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//*[@text='您还未绑定设备,请先绑定!']' using 'XPATH' with the contextId: '' multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":7,"value":"No element found"}
[AndroidBootstrap] Received command result from bootstrap
[BaseDriver] Waited for 137 ms so far
[AndroidBootstrap] Sending command to android: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//*[@text='您还未绑定设备,请先绑定!']","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got data from client: {"cmd":"action","action":"find","params":{"strategy":"xpath","selector":"//*[@text='您还未绑定设备,请先绑定!']","context":"","multiple":false}}
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command of type ACTION
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Got command action: find
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Finding '//*[@text='您还未绑定设备,请先绑定!']' using 'XPATH' with the contextId: '' multiple: false
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Using: UiSelector[CLASS=android.widget.TextView, INSTANCE=3]
[AndroidBootstrap] [BOOTSTRAP LOG] [debug] Returning result: {"status":0,"value":{"ELEMENT":"5"}}
[AndroidBootstrap] Received command result from bootstrap
[MJSONWP] Responding to client with driver.findElement() result: {"ELEMENT":"5"}
[HTTP] <-- POST /wd/hub/session/45d30326-3591-4083-8256-1700b3cf9542/element 200 10806 ms - 87
[HTTP] --> POST /wd/hub/session/45d30326-3591-4083-8256-
...全文
5182 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
Gee_sin 2021-04-25
  • 打赏
  • 举报
回复
我也遇到了这个问题。。。没解决掉,现在直接弃用了,还不如我自己点
hlx198654 2021-04-01
  • 打赏
  • 举报
回复
你这个像弹出框提醒,不要用文字定位,有直接确认alert或取消alert 的指令
nǒng啥咧 2021-03-10
  • 打赏
  • 举报
回复
楼主解决了吗

5,177

社区成员

发帖
与我相关
我的任务
社区描述
软件工程/管理 质量管理/软件测试
功能测试压力测试安全性测试 个人社区 湖南省·长沙市
社区管理员
  • 软件测试
  • 虫无涯
  • 小博测试成长之路
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

欢迎大家加入到软件测试的社区,在这里,希望大家勇于发表自己的看法,欢迎大家分享自己在软件测试工作过程中遇到的问题以及工作经验分享。

1.想转行的小伙伴,遇到问题没有及时回复的,可以私聊小博进行反馈

2.大家对社区有好的建议,都可以在社区发帖进行反馈

推荐大家学习的软件测试入门笔记:软件测试入门学习笔记

试试用AI创作助手写篇文章吧