Chore: [ALAS] Add method uninstall_uiautomator2

This commit is contained in:
LmeSzinc 2024-04-29 23:43:54 +08:00
parent 6818a9d86c
commit 24fbff17ef

View File

@ -242,6 +242,17 @@ class Uiautomator2(Connection):
hierarchy = etree.fromstring(content.encode('utf-8'))
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
def resolution_uiautomator2(self, cal_rotation=True) -> t.Tuple[int, int]:
"""