openatx / uiautomator2

Android Uiautomator2 Python Wrapper
MIT License
6.26k stars 1.36k forks source link

在android 13的机器上,无法通过get_message的方法去获取toast. #920

Closed jenkinstestgithub closed 1 week ago

jenkinstestgithub commented 9 months ago

在android 13的机器上,无法通过get_message的方法去获取toast.

lysf0515 commented 6 months ago

有找到实现获取 toast 的方法吗

jenkinstestgithub commented 4 months ago

有找到实现获取 toast 的方法吗

没有,现在是通过截图后,识别提取文案的方式去获取这个toast的内容

jackwonglstc commented 3 months ago

我的小米手机,android 12版本也一样获取不了

xob0t commented 1 month ago

UPD: I was having this issue on android 11 on the version 3.1.0, downgrading to 2.16.26 fixed it for me

shaping520 commented 1 month ago

有找到实现获取 toast 的方法吗

我研究出来办法了,代码如下: import uiautomator2 as u2 d = u2.connect() d.jsonrpc.setToastListener(True) // toast显示后 toast_msg = d.toast.get_message() print(toast_msg)

codeskyblue commented 1 week ago

已修复