AirtestProject / AirtestProject/Poco

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

Aperta
#292 1 commento 0 reazioni 0 assegnatari Vedi su GitHub
enhancement
Lingua principale
Python
Stelle
2k
Fork
341
Metriche di merge delle PR
Nessuna PR unita negli ultimi 30g

Descrizione

比如以下这个滑动选择器
![滑动选择器](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控件的问题

Guida per i contributori

Nessuna guida per i contributori indicizzata per questo repository

Valutazione

Questa issue non è ancora stata valutata.

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.