1
0
mirror of https://gitee.com/sui-feng-cb/AzurLaneAutoScript1 synced 2026-03-11 22:08:20 +08:00

Fix: No compress in u2.dump_hierarchy

Donno why setting compressed=True may drop resource-id of nodes
This commit is contained in:
LmeSzinc
2025-03-21 03:20:41 +08:00
parent ab0137c870
commit 3eaac0999f

View File

@@ -376,7 +376,8 @@ class Uiautomator2(Connection):
@retry
def dump_hierarchy_uiautomator2(self) -> etree._Element:
content = self.u2.dump_hierarchy(compressed=True)
content = self.u2.dump_hierarchy(compressed=False)
# print(content)
hierarchy = etree.fromstring(content.encode('utf-8'))
return hierarchy