<!--
{
  "availability" : [
    "Xcode: 16.3.0 -",
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "XCUIAutomation",
  "identifier" : "/documentation/XCUIAutomation/XCUIElement/tap(withNumberOfTaps:numberOfTouches:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "XCUIAutomation"
    ],
    "preciseIdentifier" : "c:objc(cs)XCUIElement(im)tapWithNumberOfTaps:numberOfTouches:"
  },
  "title" : "tap(withNumberOfTaps:numberOfTouches:)"
}
-->

# tap(withNumberOfTaps:numberOfTouches:)

Sends one or more taps with one or more touch points.

```
func tap(withNumberOfTaps numberOfTaps: Int, numberOfTouches: Int)
```

## Parameters

`numberOfTaps`

The number of taps.

`numberOfTouches`

The number of touch points.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)