Skip to content

Locators need a visible-state filter (getByRole { visible: true }) #88

Description

@BenSheridanEdwards

Real-world gap confirmed on-device in WordlyMobileAutomatedTests (2026-07-02): an iOS SwiftUI sheet exposes several XCUIElementTypeTextField nodes where only one has visible="true" — the focused search field. getByRole("textfield") matches a hidden instance first, so fill() types into the wrong element and the suite must fall back to '-ios predicate string:type == "XCUIElementTypeTextField" AND visible == 1'. Suggested: a { visible: true } option on by.role/getByRole (and possibly all locators) filtering on the node's visible attribute (iOS) / displayed attribute (Android), so the last raw-predicate fallback in that suite can be deleted. Complements the checked/disabled filters added in #76.

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