Skip to content

is: an ambiguous selector reports selector_not_found; RN text yields duplicate-label nodes #2870

Description

@thymikee

Problem

is visible 'label="Catalog scroll: top"' fails on every run on the fixture Catalog screen (iOS Simulator, AX bridge), even on a fresh capture. get text with the same selector finds the element, and id="catalog-scroll-state" passes is visible.

Mechanism (from a live investigation on 2026-09-24, found alongside #2866/#2869):

  • React Native exposes that text as a paragraph node plus a child node that carries the same label, so the label selector matches 2 nodes.
  • is resolves through readUnique (packages/selectors/src/internal/resolution-policy.ts:68-71) and refuses a non-unique match. get text resolves through readText (:63-66), which picks one match, so it succeeds.
  • is then reports the ambiguity as selector_not_found, which to an agent means the element does not exist.

Required behavior

  • An ambiguous match on is returns a typed ambiguity outcome that names the match count, not selector_not_found. Key it on a typed reason, not on message text.
  • Decide whether the duplicate RN text node (parent paragraph plus child with an identical label) should be one node in presentation. That would make label selectors on RN text unique, as they read to a user.

Evidence to reproduce

Open the fixture app's Catalog tab on an iOS 26.2 simulator. is visible 'label="Catalog scroll: top"' fails every time; get text with the same selector succeeds.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions