fix: add method uninstall_uiautomator2

This commit is contained in:
2026-07-05 23:41:55 +08:00
parent 8eed513497
commit 42459df920
+11
View File
@@ -241,6 +241,17 @@ class Uiautomator2(Connection):
hierarchy = etree.fromstring(content.encode('utf-8')) hierarchy = etree.fromstring(content.encode('utf-8'))
return hierarchy return hierarchy
def uninstall_uiautomator2(self):
logger.info('Removing uiautomator2')
for file in [
'app-uiautomator.apk',
'app-uiautomator-test.apk',
'minitouch',
'minitouch.so',
'atx-agent',
]:
self.adb_shell(["rm", f"/data/local/tmp/{file}"])
@retry @retry
def resolution_uiautomator2(self, cal_rotation=True) -> t.Tuple[int, int]: def resolution_uiautomator2(self, cal_rotation=True) -> t.Tuple[int, int]:
""" """