From 7ba4852ec9a86ea921ade87b5299729682703b10 Mon Sep 17 00:00:00 2001 From: codeskyblue Date: Mon, 8 Jul 2024 17:58:39 +0800 Subject: [PATCH] fix DeadSystemRuntimeException not in message, close #1001 --- uiautomator2/core.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/uiautomator2/core.py b/uiautomator2/core.py index 9a07073..0e49a41 100644 --- a/uiautomator2/core.py +++ b/uiautomator2/core.py @@ -138,7 +138,7 @@ def _jsonrpc_call(dev: adbutils.AdbDevice, method: str, params: Any, timeout: fl if "android.os.DeadObjectException" in message: # https://developer.android.com/reference/android/os/DeadObjectException raise UiAutomationNotConnectedError("android.os.DeadObjectException") - if "android.os.DeadSystemRuntimeException": + if "android.os.DeadSystemRuntimeException" in message: raise UiAutomationNotConnectedError("android.os.DeadSystemRuntimeException") if "uiautomator.UiObjectNotFoundException" in message: raise UiObjectNotFoundError(code, message, params)