AirtestProject / AirtestProject/Poco

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

Đang mở
#100 3 bình luận 0 reaction 1 người được giao Được @adolli nhận Xem trên GitHub
Ngôn ngữ chính
Python
Star
2k
Fork
341
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

【测试脚本】
```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)

解释不通

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.