I've got a subclass of UIView, let's say it's class DemoView: UIView { }
which contains UILabel and UIButton. I needed to group it and add UIAccessibilityCustomAction so I've overriden the var accessibilityElements: [Any]?
and used union to connect both elements. I've also assigned "Users" string to accessibilityLabel
.
From user perspective this works as it should, VoiceOver reads Users
and then user can select custom action which is named Edit
.
Problem is that I don't know how can I fire this custom action from UITests. I know that XCUIElement
contains array of UICustomActions
and I can get its selector but then what?