Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

iOS横屏App,能够识别图片,但是点击无反应,经测试是没有点击到真实的控件位置 #1267

Open
snowINsummer opened this issue Dec 24, 2024 · 1 comment

Comments

@snowINsummer
Copy link

  • 图像识别问题

描述问题bug

iOS横屏App,能够识别图片,但是点击无反应,经测试是没有点击到真实的控件位置

没有报错
[Start running..]
save log in '/var/folders/jt/s4dqhdln5g58_5051jl4lskh0000gq/T/AirtestIDE/scripts/4f2ebf92f0d3bcf60c088d7ebda461cd'
[14:51:27][INFO]<airtest.core.api> Try finding: Template(/Users/zhangli/Documents/autotest/case/测试流程/TW/untitled.air/tpl1735022895459.png)
[14:51:27][DEBUG]<airtest.core.api> try match with MultiScaleTemplateMatchingPre
[14:51:29][DEBUG]<airtest.aircv.multiscale_template_matching> [MSTemplatePre] threshold=0.7, result={'result': (748, 288), 'rectangle': ((527.94, 178.75599999999997), (527.94, 398.756), (968.94, 398.756), (968.94, 178.75599999999997)), 'confidence': 0.9908546805381775}
[14:51:29][DEBUG]<airtest.aircv.utils> find_best_result() run time is 1.63 s.
[14:51:29][DEBUG]<airtest.core.api> match result: {'result': (748, 288), 'rectangle': ((527.94, 178.75599999999997), (527.94, 398.756), (968.94, 398.756), (968.94, 178.75599999999997)), 'confidence': 0.9908546805381775, 'time': 1.6280968189239502}
----------------------------------------------------------------------
Ran 1 test in 3.271s

OK
[14:51:30][INFO]<airtest.core.ios.rotation> update orientation None->UIA_DEVICE_ORIENTATION_LANDSCAPERIGHT
[Finished]

============================================================


相关截图
image

复现步骤
from airtest.core.api import *
import pywinauto
auto_setup(file)
touch(图片)

预期效果
点击对应的图片

python 版本: python3.9

airtest 版本: 1.3.5

airtest版本通过pip freeze可以命令可以查到

设备:

  • 型号: [iphone 12]
  • 系统: [iOS16.0]

其他相关环境信息
macos15,windows也有相同的问题

@snowINsummer
Copy link
Author

补充一下,录制的脚本用命令行执行.py可以正常识别。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant