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

通过sibling获取的文本不会自动更新 #954

Open
qingqingcaoyuanlin opened this issue Apr 15, 2024 · 0 comments
Open

通过sibling获取的文本不会自动更新 #954

qingqingcaoyuanlin opened this issue Apr 15, 2024 · 0 comments

Comments

@qingqingcaoyuanlin
Copy link

使用sibling获取文本,中途文本变化,再进行获取,获取到的文本内容是旧的,不是最新,需要执行一次d.dump_hierarchy()才能获取到最新的文本。

  • uiautomator2的版本号:Version: 2.16.23
  • text控件文本内容是变化的,d(text='abc').sibling(resourceId="xxx“).get_text()多次执行,获取的文本都是不变的,
  • 需要先执行d.dump_hierarchy(),再执行d(text='abc').sibling(resourceId="xxx“).get_text()才能获取到最新的文本。
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