Open gmcadosch opened 2 years ago
Hey, feel free to open a PR for that, great idea!
I'd only picked a more verbose name for func find(_ id: String)
to not be confused with other modifiers, including find(viewWithId:)
.
Maybe find(viewWithAccessibilityId:)
?
Yes, thought the same, but it‘s a bit long, though. But in regard to the other find versions it‘s probably the right name.
Am 25.01.2022 um 18:28 schrieb Alexey Naumov @.***>:
I'd only picked a more verbose name for func find(_ id: String) to not be confused with other modifiers, including find(viewWithId:).
Maybe find(viewWithAccessibilityId:) ?
— Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android. You are receiving this because you authored the thread.
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 {
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.