Closed afret0 closed 5 months ago
手机型号 小米mix4 小米 pad 5 pro
uiautomator2的版本号(pip show uiautomator2) 2.16.19
pip show uiautomator2
手机截图
相关日志(Python控制台错误信息, adb logcat完整信息, atxagent.log日志)
C:\Users\kong5\scoop\apps\python36\current\lib\site-packages\uiautomator2_selector.py:319: RuntimeWarning: waitForExists readTimeout: HTTPConnectionPool(host='127.0.0.1', port=55879): Read timed out. (read timeout=10.5) RuntimeWarning)
最好能附上可能复现问题的代码。
def is_live(self) -> (bool, str): """
Returns: (bool, str) (是否为直播, 进入直播页面资源值) """ r_id_a = "com.ss.android.ugc.aweme:id/szv" if self.device( resourceId=r_id_a, text="点击进入直播间", className="android.widget.TextView" ).exists(timeout=0.3): return True, r_id_a r_id_a = "com.ss.android.ugc.aweme:id/t3t" if self.device(resourceId=r_id_a, className="android.widget.Button").exists( timeout=0.3 ): return True, r_id_a return False, ""
记录了一下时间, 每次 devices.exists() 调用需要 28s 左右....
就很迷...
try the latest version
手机型号 小米mix4 小米 pad 5 pro
uiautomator2的版本号(
pip show uiautomator2
) 2.16.19手机截图
相关日志(Python控制台错误信息, adb logcat完整信息, atxagent.log日志)
C:\Users\kong5\scoop\apps\python36\current\lib\site-packages\uiautomator2_selector.py:319: RuntimeWarning: waitForExists readTimeout: HTTPConnectionPool(host='127.0.0.1', port=55879): Read timed out. (read timeout=10.5) RuntimeWarning)
最好能附上可能复现问题的代码。
def is_live(self) -> (bool, str): """