AirtestProject / AirtestProject/Poco

ios下使用UnityPoco,drag_to函数与swipe函数失效

Open
#414 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
2k
Forks
341
PR merge metrics
No merged PRs in 30d

Description

以下代码在ios下使用失效
```
item_start.child().drag_to(item_end.child(),2)
```
尝试换用unityPoco的swipe函数依然无法正常运行

经过尝试,我写了一个坐标换算函数,然后调用iosPoco的swipe函数,顺利运行
```
def get_absolute_pos(pos):
window_size = poco_ios.get_screen_size()
return [pos[1] * window_size[0], (0.5 - pos[0]) * window_size[1]]

swipe(get_absolute_pos(item_start.child().get_position()), get_absolute_pos(item_end.child().get_position()))
```

猜测是UnityPoco在ios下的坐标换算存在问题

python 版本: python 3.7.9

poco 版本: 1.0.79

设备:

型号: iPhone XS
系统: iOS 13.3

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.