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

反馈一个很常见且很严重的bug,关于bounds不能正确获取控件坐标 #269

Open
670027822 opened this issue Nov 1, 2024 · 3 comments

Comments

@670027822
Copy link

代码如下,很简单的代码:
let guan12 = id("com.ss.android.ugc.aweme:id/ih8").findOne(0).bounds();
//click(guan12.centerX(), guan12.centerY());
toast(guan12);
一直不能正常点击,最后打印才知道,原本应该获取到的内容是[952,1036,1024,1108],但是实际打印的却是:[952,1036-1024,1108],怪不得点击不上,可以说是极其离谱的一个bug

@670027822
Copy link
Author

有测试了一下,醉了,感情这个函数的值是随机胡乱输出的,不仅把逗号换成-号,还会用控件宽度和高度去替换应有的值。

@670027822
Copy link
Author

加 .visibleToUser(true) 终于成功了,可能是获取到了隐藏控件,大家注意一下这个问题

@sindon123
Copy link

个人写法问题

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