Skip to content

Instantly share code, notes, and snippets.

@mathonsunday
Created April 22, 2021 20:47
Show Gist options
  • Save mathonsunday/5b9384f7b6e03103d81fe8abe822f6b3 to your computer and use it in GitHub Desktop.
Save mathonsunday/5b9384f7b6e03103d81fe8abe822f6b3 to your computer and use it in GitHub Desktop.
public class MapBot: Robot, RobotItem {
...
@discardableResult
public func tapAnyCluster() -> MapBot {
app.otherElements[mapViewAccessibilityIdentifier]
.descendants(matching: .any)
.allElementsBoundByIndex
.first(where: { $0.label.contains(clusterIdentifier) })?
.tap()
return self
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment