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

关于touch命令 #1

Open
JouSF-1409 opened this issue Jul 16, 2021 · 3 comments
Open

关于touch命令 #1

JouSF-1409 opened this issue Jul 16, 2021 · 3 comments

Comments

@JouSF-1409
Copy link

您好,我最近也在看airtest在少前中运用。原本想写个13-4自动捞核心。
但是最近遇到一个问题,就是无论是自己手动截取的图还是其自动的录制功能,touch执行后都变成了返回上一页面。不知道您有没用遇到这个问题。

@fyypll
Copy link
Owner

fyypll commented Jul 16, 2021

识图出问题可以用坐标试试,如果touch那个坐标还是返回上一页面,可以检查下代码逻辑对不对。airtest的IDE运行是有测试报告的,每一步运行点过哪里都是自动截图标识出来的。建议运行到出问题的地方,然后停止去看看测试报告

@JouSF-1409
Copy link
Author

经过一些测试,发现有两种方法可以解决:问题出现平台,mumu,分辨率1440,链接方法,随意。
一种是点击同一区域两次,一种是touch 的duration 参数调整为0.1s上下,而非默认的0.01s。
问题出现的原因可能是因为调试的间隙长期的静置,或许与其客户端的一些细节有关。至少我写方舟脚本的时候没遇到这种情况。
如何更真实的还原人的操作,可能需要进一步调试。

@fyypll
Copy link
Owner

fyypll commented Aug 9, 2021

感谢分享,最近更新了Airtest的IDE,IDE版本v1.2.10。在连接网易mumu模拟器时,发现不管touch哪里,touch的是坐标还是图片,都是点击的左上角,目前没有找到解决办法。
之前的通过python部署环境以命令行的方式运行的脚本则一切正常,airtest包的版本为v1.1.10。尚未测试之前的代码在最新的airtest包v1.2.0的环境下是否能正常touch。

@fyypll fyypll closed this as completed Apr 19, 2024
@fyypll fyypll reopened this Apr 19, 2024
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

2 participants