Skip to content

Find by AccessibilityIdentifier #77

Open
@gmcadosch

Description

@gmcadosch

There's a find(viewWithId:) function, but as I already set the accessibilityIdentifier property on all views for UI testing, I needed a new find function. I implemented this as a shortcut:

extension InspectableView {
func find(_ id: String) throws -> InspectableView<ViewType.ClassifiedView> {
try find { try $0.accessibilityIdentifier() == id }
}
}

Would be nice to see something like this integrated into the standard package as probably everyone doing UI testing already has those identifiers set.

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