AirtestProject / AirtestProject/Poco

[UIObjectProxy]判断元素是否存在问题

未关闭
#100 3 条评论 0 个 reaction 已指派 1 人 已被 @adolli 认领 在 GitHub 查看
主要语言
Python
星标
2k
派生
341
PR 合并指标
30 天内没有已合并 PR

描述

【测试脚本】
```py
from poco.drivers.android.uiautomation import AndroidUiautomationPoco
poco = AndroidUiautomationPoco(use_airtest_input=True, screenshot_each_action=False)
p=poco(text="fdddgfdg")
while True:
print(p.exists())
```
【手动控制页面跳转】
1)进入页面
![image](https://user-images.githubusercontent.com/11953895/47913616-b91fbd00-ded7-11e8-9fcc-c8adc73a8dd0.png)
结果:True
2)上滑至text="fdddgfdg"离开视线
![image](https://user-images.githubusercontent.com/11953895/47913682-f2f0c380-ded7-11e8-809c-85cd3957eb73.png)
结果:True
3)切换Fragment
![image](https://user-images.githubusercontent.com/11953895/47913716-11ef5580-ded8-11e8-968b-b4c034e545e8.png)
结果:False
4)切回步骤2页面
![image](https://user-images.githubusercontent.com/11953895/47913682-f2f0c380-ded7-11e8-809c-85cd3957eb73.png)
结果:True
5)点击左上角切换Activity
![image](https://user-images.githubusercontent.com/11953895/47913794-511da680-ded8-11e8-8aac-e1f03f3ec743.png)
结果:还是True

根据判断逻辑:
![image](https://user-images.githubusercontent.com/11953895/47913810-61ce1c80-ded8-11e8-829b-40588d50b7d7.png)
![image](https://user-images.githubusercontent.com/11953895/47913823-6d214800-ded8-11e8-8f15-8c2878bb81f1.png)

解释不通

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。