diff --git a/internal/driver/ioscompanion/driver.go b/internal/driver/ioscompanion/driver.go index 132db65..486f662 100644 --- a/internal/driver/ioscompanion/driver.go +++ b/internal/driver/ioscompanion/driver.go @@ -594,6 +594,12 @@ func (d *Driver) WaitForIdle(ctx context.Context, _ time.Duration) error { if err != nil { return nil } + // Unresolved bridge values mean the tree is mid-update; report the + // snapshot transitional so the streak resets instead of declaring a + // half-readable screen stable. + if hasUnresolvedValues(dump) { + return nil + } mapped, err := MapHierarchy(dump, d.screenWidth, d.screenHeight) if err != nil { return nil diff --git a/internal/driver/ioscompanion/hierarchymap.go b/internal/driver/ioscompanion/hierarchymap.go index fa8a227..205ccd2 100644 --- a/internal/driver/ioscompanion/hierarchymap.go +++ b/internal/driver/ioscompanion/hierarchymap.go @@ -108,6 +108,11 @@ func mapElement(element *rawElement) (treeNode, bool) { } value := stringValue(element.AXValue) + if value == unresolvedValueSentinel { + // Bridge state, not app content: surfacing it would show phantom + // field values in snapshots taken while the bridge catches up. + value = "" + } label := stringValue(element.AXLabel) editable := isEditable(element.Type)