AirtestProject / AirtestProject/Poco

Wrong x, y position of element

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

描述

I'm testing native Android application with text menu, and trying to iterate via every menu item.

The problem with poco in the following:

` poco(text='menu item text').click()`

this code sometimes doesn't click anything (but sometimes works fine).

The following code:

```
pos = poco(text='menu item text').get_position()
y = pos[1] * poco.device.display_info['height']
touch([100, y])
```

sometimes clicking wrong elements, because get_position() method returns the same Y value for two different menu items.

What we can use to properly click the item if poco lib detects it on the view? How to properly detect the Y position of item? Why sometimes it works, but sometimes - no? (for the same app&menu)

贡献指南

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

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

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