fix(hierarchy): populate ResourceID from accessibilityIdentifier

iOS Compose surfaces testTag as accessibilityIdentifier. Previously
only resource-id and identifier seeded element.ResourceID, leaving
element.id empty for iOS Compose nodes and forcing specs to walk
attrs to recover stable identifiers.
This commit is contained in:
pj committed 2026-04-26 23:56:52 +07:00
1 parent 569e0c818e
commit 139ca958f6
2 files changed
+17

No files matched your search

+3
View File
@@ -193,6 +193,9 @@ func elementFromNode(node *treeNodeJSON) *Element {
if element.ResourceID == "" {
element.ResourceID = attrs["identifier"]
}
if element.ResourceID == "" {
element.ResourceID = attrs["accessibilityIdentifier"]
}
element.Text = attrs["text"]
element.Description = attrs["content-desc"]
if element.Description == "" {