UITesting常见问题收集

1、 test failure: -[HallTestCase testStartLiving] failed: UI Testing Failure - Unable to find hit point for Button 0x1415a9530: traits: 8589934849, {{288.0, 140.5}, {72.0, 27.0}}, identifier: '1', label: 'mg music xz002 '

问题原因:当前点击的坐标点不在指定element的frame内或者指定element当前不可点击 解决方法: (1)通过计算element准确坐标点来点击坐标; (2)在点击element之前,给出一个等待时间;

2、 test failure: -[HallTestCase testStartLiving] failed: UI Testing Failure - Failed to get snapshot within 15.0s

问题原因:由于iOS版本过高或者Xcode版本过低,无法在真机上运行UI Testing 解决方法:iOS 10.0.1以上版本配合Xcode8.1以上版本

3、 test failure: -[inkeUITests testStartLiving] failed: UI Testing Failure - Multiple matches found:

问题原因:一般出现在当前页面同时出现两个identifiers完全相同的element 解决方法:设置identifiers唯一性

4、 test failure: -[inkeUITests testStartLiving] failed: UI Testing Failure - Did not receive view did disappear notification within 2.0s

问题原因:在对element进行action操作时,上一个view或者viewcontroller未完全消失; 解决方法:在点击element之前,给出一个等待时间;

5、 test failure: -[inkeUITests testStartLiving] failed: UI Testing Failure - Failed to scroll to visible (by AX action) Button 0x12f065870: traits: 8724152321, {{8.0, 26.0}, {46.0, 30.0}}, error: Error -25204 performing AXAction 2003

问题原因: (1)当前element存在,但是不可见; (2)当前element无法点击到其hit区域

6、 App animations complete notification not received, will attempt to continue. Synthesize event Wait for app to idle 实现点击控件操作时长时间无点击效果,控制台输出信息出现以上信息;

原因:当前操作页面有正在执行的动画,没有接收到动画结束的通知。(页面处于active状态,无法进行UI Testing操作) 解决方法: (1)等待动画结束后再进行操作; (2)若对当前测试无实质性的影响,可先去掉该动画;

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值