# simulator_tap

> MCP टूल जो टीम के Simulator की स्क्रीन पर टैप या long-press करता है, किसी point पर या सेलेक्टर से बताए गए एलिमेंट पर।

Source: https://air.build/hi/docs/mcp-tools/simulator_tap/

`simulator_tap` टीम के चल रहे Simulator की स्क्रीन पर टैप करता है, दो में से किसी एक तरीके से। ठीक एक दें:

- **कोऑर्डिनेट**: `x` और `y`, [स्क्रीन कोऑर्डिनेट](https://air.build/hi/docs/mcp-tools/simulator_screen/#coordinates) में। टैप तुरंत वहाँ पड़ता है, उसके नीचे चाहे जो हो।
- **कोई एलिमेंट**: एक सेलेक्टर, [simulator_describe_ui](https://air.build/hi/docs/mcp-tools/simulator_describe_ui/) या [simulator_find](https://air.build/hi/docs/mcp-tools/simulator_find/) से `text`, `id`, `value`, `role` और `nodeId` में से कोई भी (देखें [सेलेक्टर](https://air.build/hi/docs/mcp-tools/simulator_find/#selector))। टूल `timeoutSeconds` तक ऐसे मेल खाने वाले एलिमेंट का इंतज़ार करता है जो enabled हो और स्थिर हो, फिर उसे टैप करता है (उसका केंद्र, या switches जैसे कंट्रोल के लिए iOS जो point देता है)। यह scroll नहीं करता: पहले [simulator_scroll_to](https://air.build/hi/docs/mcp-tools/simulator_scroll_to/) से एलिमेंट को स्क्रीन पर लाएँ।

`duration` उँगली को दबाए रखता है: long press। टूल यह नहीं जाँचता कि टैप ने क्या किया; [simulator_describe_ui](https://air.build/hi/docs/mcp-tools/simulator_describe_ui/) से देखें या [simulator_wait](https://air.build/hi/docs/mcp-tools/simulator_wait/) से नतीजे का इंतज़ार करें।

| रीड-ओनली | डिस्ट्रक्टिव | आइडेम्पोटेंट |
| --- | --- | --- |
| नहीं | नहीं | नहीं |

## इनपुट

| इनपुट | टाइप | ज़रूरी | डिफ़ॉल्ट | यह क्या करता है |
| --- | --- | --- | --- | --- |
| `teamId` | string (UUID) | हाँ | — | टीम, [list_teams](https://air.build/hi/docs/mcp-tools/list_teams/) से |
| `simulator` | string | नहीं | टीम का डिफ़ॉल्ट डिवाइस | कौन-सा डिवाइस, [list_simulators](https://air.build/hi/docs/mcp-tools/list_simulators/#result) से मिले `id` से |
| `x` | number, -100000 से 100000 | `y` के साथ | — | कहाँ टैप करना है, आड़े |
| `y` | number, -100000 से 100000 | `x` के साथ | — | कहाँ टैप करना है, नीचे की ओर |
| `text`, `id`, `value`, `role`, `nodeId`, `exact`, `strict` | देखें [सेलेक्टर](https://air.build/hi/docs/mcp-tools/simulator_find/#selector) | `x`, `y` के बजाय | — | टैप करने वाला एलिमेंट |
| `duration` | number, 0 से 60 | नहीं | एक सामान्य टैप | कितने सेकंड दबाए रखना है: long press |
| `timeoutSeconds` | number, 0 से 600 | नहीं | `10` | सेलेक्टर के साथ: एलिमेंट का कितनी देर इंतज़ार करना है |
| `display` | string | नहीं | इस्तेमाल में चल रहा display | कोऑर्डिनेट के साथ, foldable पर: [simulator_displays](https://air.build/hi/docs/mcp-tools/simulator_displays/) से मिला display का `screenId` |

## नतीजा

कोऑर्डिनेट के साथ:

| फ़ील्ड | मतलब |
| --- | --- |
| `ok` | `true` |

सेलेक्टर के साथ:

| फ़ील्ड | मतलब |
| --- | --- |
| `ok` | `true` |
| `element` | टैप किया गया एलिमेंट (फ़ील्ड [simulator_find](https://air.build/hi/docs/mcp-tools/simulator_find/#result) की तरह) |
| `point` | `x`, `y`: टैप कहाँ पड़ा |
| `exact` | इसका टेक्स्ट query के बराबर है या नहीं |
| `matchCount` | कितने इस्तेमाल लायक एलिमेंट मेल खाए; 1 से ज़्यादा का मतलब है कि क्रम ने चुना |
| `excluded` | वे एलिमेंट जो मेल खाए पर छोड़ दिए गए, `reason` के साथ |
| `elapsedMs` | जब इंतज़ार में एक से ज़्यादा round लगे: इसने कितना इंतज़ार किया, मिलीसेकंड में |

```json
{
  "ok": true,
  "element": { "label": "New note", "identifier": "new-note", "role": "AXButton",
               "frame": { "x": 16, "y": 120, "width": 370, "height": 52 }, "enabled": true, "interactive": true, "adjustable": false },
  "point": { "x": 201, "y": 146 },
  "exact": true,
  "matchCount": 1,
  "excluded": []
}
```

## त्रुटियाँ

| संदेश | कब | क्या करें |
| --- | --- | --- |
| Give both x and y. | सिर्फ़ एक कोऑर्डिनेट | दोनों भेजें |
| Give coordinates or a selector, not both. | कोऑर्डिनेट और सेलेक्टर फ़ील्ड एक साथ | एक या दूसरा भेजें |
| Name the element: text, id, value, role or nodeId. | न कोऑर्डिनेट न सेलेक्टर | एक भेजें |
| no usable element matching _selector_ within _n_s | समय पर कुछ भी इस्तेमाल लायक मेल नहीं खाया | देखें [सेलेक्टर त्रुटियाँ](https://air.build/hi/docs/mcp-tools/simulator_find/#selector) |

साथ ही बाकी [सेलेक्टर त्रुटियाँ](https://air.build/hi/docs/mcp-tools/simulator_find/#selector), और वे त्रुटियाँ जो हर Simulator टूल लौटा सकता है: देखें [start_simulator](https://air.build/hi/docs/mcp-tools/start_simulator/#device-errors)।

## उदाहरण

```json
{"name": "simulator_tap", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "id": "new-note"}}
```
