Skip to content

iOS clickNode accessibility-id fallback can defeat nth()/near() #85

Description

@BenSheridanEdwards

src/driver.ts clickNode: when the exact-XPath click throws (e.g. stale @value predicate), the fallback $('~name') resolves the FIRST element with that accessibility id and returns true, so a locator like getByText('Save').nth(1) or .near(...) gets the wrong instance clicked and the coordinate fallback never runs. Suggested: skip the ~name fallback when the locator carried an index/proximity (needs plumbing), or drop the fallback and return false so the coordinate tap (which honours the resolved node) runs. Found during adversarial review (2026-07-02).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions