AirtestProject / AirtestProject/Poco

poco(text='消息').click() 报错:poco.exceptions.InvalidOperationException: Click position out of screen

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

Description

(请尽量按照下面提示内容填写,有助于我们快速定位和解决问题,感谢配合。否则直接关闭。)

**(重要!问题分类)**
* 图像识别相关问题 -> https://github.com/AirtestProject/Airtest/issues
* 测试开发环境AirtestIDE使用问题 -> https://github.com/AirtestProject/AirtestIDE/issues
* 控件识别、树状结构、poco库报错 -> 此仓库

**描述问题bug**
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airtest/cli/runner.py", line 73, in runTest
six.reraise(*sys.exc_info())
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/six.py", line 703, in reraise
raise value
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/airtest/cli/runner.py", line 70, in runTest
exec(compile(code.encode("utf-8"), pyfilepath, 'exec'), self.scope)
File "/Users/yixia/Documents/qwe.air/qwe.py", line 15, in
poco(text='消息').click()
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/poco/proxy.py", line 23, in wrapped
return func(proxy, *args, **kwargs)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/poco/proxy.py", line 334, in click
ret = self.poco.click(pos_in_percentage)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/poco/pocofw.py", line 251, in click
raise InvalidOperationException('Click position out of screen. pos={}'.format(repr(pos)))
poco.exceptions.InvalidOperationException: Click position out of screen. pos=[1.5555555555555556, 0.060648148148148145]

**复现步骤**
android 底部bar按钮,共5个

poco(text='消息').click() 点击报错
poco(text='我的').click() 点击正常切界面
poco(text='发布').click() 点击正常切界面
poco(text='发现').click() 点击正常切界面
poco(text='首页').click() 点击正常切界面

**预期效果**
点击切到消息界面

**相关截图**

**python 版本:** `python3.9`

**poco 版本:** `1.2.3`

**设备:**
- 型号: vivo x20
- 系统:Android 8.1

**其他相关环境信息**

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.