AirtestProject / AirtestProject/Poco

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

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

描述

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

贡献指南

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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