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

期望恢复功能 x, y = d(text="Settings").center(offset=(0, 0)) # left-top x, y #1017

Open
TonyGao2527 opened this issue Jul 26, 2024 · 0 comments

Comments

@TonyGao2527
Copy link

uiautomator2==3.2.0
有时候不是想获取元素中心位置,而是某个位置
如下方日历,当日背景是蓝色,这个蓝色区域是固定的,
但是随着日期变化,中心位置不一定是蓝色,
所以相获取(0.5, 0.25) 这个位置 进行断言,
它一定是固定的。
目前使用 .center(offset=(0, 0))会报错如下信息:
TypeError: XMLElement.center() got an unexpected keyword argument 'offset'
QQ20240726-112029
QQ20240726-153150

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

No branches or pull requests

2 participants