Skip to content

Commit

Permalink
Make .tapUnhittable() to tap the center of the frame to match the reg…
Browse files Browse the repository at this point in the history
…ular .tap()
  • Loading branch information
rzakhar committed Oct 13, 2021
1 parent 702b2ff commit 89108ed
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public extension XCUIElement {
// Sends a tap event at the element's coordinate. Useful if the regular .tap() fails.
func tapUnhittable() {
XCTContext.runActivity(named: "Tap \(self) by coordinate") { _ in
coordinate(withNormalizedOffset: CGVector(dx: 0.0, dy: 0.0)).tap()
coordinate(withNormalizedOffset: CGVector(dx: 0.5, dy: 0.5)).tap()
}
}
#endif
Expand Down

0 comments on commit 89108ed

Please sign in to comment.