uiautomator2
uiautomator2 copied to clipboard
为什么toast.show()不能使用,toast.get_message()正常使用
调用toast.show()完全没反应,但toast.get_message()可正常截获toast!
- 手机型号 Nubia Z11, android 9.0, nubia UI 7.0
- uiautomator2的版本号(
pip show uiautomator2) 2.11.2 - 手机截图
- 相关日志
- 最好能附上可能复现问题的代码。 d.toast.show("Hello world") message = d.toast.get_message() print(message)
我也是一样不能显示toast
这是老问题吗? 我的也发生这个情况, d.toast.show("Hello world", 10.0), 手机界面什么东西都没有. 手机型号: oneplus 5T 设备系统: android 9 uiautomator2版本: 2.16.13
我也是,报错了 `F:\code\U2AppTest\venv\Scripts\python.exe F:\code\U2AppTest\u2_app_test\page\acct_list.py [D 231109 14:42:03 init:661] [pid:37108] [emulator-5554] kill process(ps): uiautomator Traceback (most recent call last): File "F:\code\U2AppTest\venv\lib\site-packages\uiautomator2_init_.py", line 486, in _jsonrpc_retry_call return self.jsonrpc_call(*args, **kwargs) File "F:\code\U2AppTest\venv\lib\site-packages\uiautomator2_init.py", line 519, in _jsonrpc_call raise GatewayError( uiautomator2.exceptions.GatewayError: (<Response [502]>, 'gateway error, time used 0.0s')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "F:\code\U2AppTest\u2_app_test\page\acct_list.py", line 385, in
Process finished with exit code 1 `
toast show 的最新版已经移除。不再提供支持