AirtestProject / AirtestProject/Poco

能否实现定位滑动选择器的具体选项

Đang mở
#292 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
enhancement
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ả

比如以下这个滑动选择器
![滑动选择器](https://user-images.githubusercontent.com/48904314/66743198-f7757880-eeab-11e9-94fd-ec87bf0e8ee7.png)

Android最细只能识别到整个竖列选择的区域,无法识别具体的选项,但是可以通过swipe()来滑动选择
![Android的UI树](https://user-images.githubusercontent.com/48904314/66741429-1b36bf80-eea8-11e9-8809-7a974bac07c2.png)

iOS的UI树可以细化到选择器的具体选项
![iOS的UI树](https://user-images.githubusercontent.com/48904314/66744266-913e2500-eeae-11e9-969f-08a2f08703e1.png)

但是:
1、poco(nameMatches="^.*Picker.*$").child(nameMatches="^.*PickerWheel.*$")[0].child(nameMatches="^.*Other.*$")[1].click()运行成功却没有生效(北京是第一个选项对应应该是child(nameMatches="^.*Other.*$")[0],child(nameMatches="^.*Other.*$")[1]应该对应天津,如果生效应该是到天津,但是运行完该语句日志显示OK,选项选中却还是北京);
2、使用"Poco Auto Recording"直接点击天津录制脚本得到语句poco(value="天津").click(),运行失败提示找不到节点;
3、使用swipe()函数移动选择器,poco("Picker").child("PickerWheel")[0].swipe([0,-0.028])运行完成选择器纹丝不动,poco("Picker").child("PickerWheel")[0].swipe([0,-0.029])运行完成选择器从第1个选项一下子跳到第8个选项。swipe()函数使用很不友好,不确定是ide的问题还是iOS控件的问题

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.