# simulator_find

> MCP टूल जो टीम के Simulator की स्क्रीन पर किसी सेलेक्टर से मेल खाने वाले हर एलिमेंट की सूची देता है, सबसे अच्छा पहले, बिना कुछ छुए।

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

`simulator_find` टीम के चल रहे Simulator की स्क्रीन पर किसी सेलेक्टर से मेल खाने वाला हर इस्तेमाल लायक एलिमेंट लौटाता है, सबसे अच्छा पहले, साथ ही वे एलिमेंट जो मेल खाए पर छोड़ दिए गए और क्यों (hidden, off-screen)। यह कुछ नहीं छूता और इंतज़ार नहीं करता: जो एलिमेंट अभी मौजूद नहीं है, उससे खाली सूची मिलती है। यह रीड-ओनली है। [simulator_tap](https://air.build/hi/docs/mcp-tools/simulator_tap/) के कार्रवाई करने से पहले यह जाँचने के लिए इसे इस्तेमाल करें कि सेलेक्टर किस पर पड़ेगा।

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

## सेलेक्टर

एलिमेंट टूल ([simulator_tap](https://air.build/hi/docs/mcp-tools/simulator_tap/), [simulator_find](https://air.build/hi/docs/mcp-tools/simulator_find/), [simulator_wait](https://air.build/hi/docs/mcp-tools/simulator_wait/), [simulator_slider](https://air.build/hi/docs/mcp-tools/simulator_slider/), [simulator_adjust](https://air.build/hi/docs/mcp-tools/simulator_adjust/), और [simulator_batch](https://air.build/hi/docs/mcp-tools/simulator_batch/) के steps) कोऑर्डिनेट की जगह सेलेक्टर से एलिमेंट बताते हैं। एलिमेंट उस accessibility tree में ढूँढा जाता है जो [simulator_describe_ui](https://air.build/hi/docs/mcp-tools/simulator_describe_ui/) दिखाता है, हर बार नए सिरे से पढ़कर, इसलिए लेआउट उसे जहाँ भी रखे, वह मिल जाता है। जो सामग्री accessibility tree में नहीं है, उसे चुना नहीं जा सकता; उसके लिए कोऑर्डिनेट इस्तेमाल करें।

| फ़ील्ड | टाइप | यह किससे मेल खाता है |
| --- | --- | --- |
| `text` | string | एलिमेंट का दिखने वाला टेक्स्ट: उसका label (या title) या उसका value। case मायने नहीं रखता, सिरों के spaces अनदेखे होते हैं, और जब तक `exact` सेट न हो, टेक्स्ट का एक हिस्सा काफ़ी है |
| `id` | string | एलिमेंट का `accessibilityIdentifier`, बिल्कुल वैसा ही |
| `value` | string | सिर्फ़ एलिमेंट का value, जैसे किसी फ़ील्ड का टेक्स्ट। case मायने नहीं रखता; जब तक `exact` सेट न हो, इसका एक हिस्सा काफ़ी है |
| `role` | string | accessibility role, बिल्कुल वैसा ही, जैसे `AXButton`, `AXSlider`, `AXSwitch` |
| `nodeId` | string | [simulator_describe_ui](https://air.build/hi/docs/mcp-tools/simulator_describe_ui/) या इस टूल से मिला `nodeId`: ठीक वही एलिमेंट और कुछ नहीं |
| `exact` | boolean | `text` और `value` को एलिमेंट के टेक्स्ट के बराबर होना चाहिए, सिर्फ़ उसमें आना काफ़ी नहीं |
| `strict` | boolean | कई इस्तेमाल लायक एलिमेंट मेल खाएँ तो सबसे अच्छा लेने के बजाय फ़ेल हो जाए |

`text`, `id`, `value`, `role` और `nodeId` में से कम से कम एक दें; खाली strings को न दिया हुआ माना जाता है। दिया गया हर फ़ील्ड मेल खाना चाहिए।

**क्रम।** जब कई एलिमेंट मेल खाते हैं, तो सबसे अच्छा पहले आता है: query के बराबर टेक्स्ट उसे शामिल करने वाले टेक्स्ट से आगे रहता है; label पर मेल value पर मेल से आगे रहता है; बटन, link, फ़ील्ड, switch या cell उन्हीं शब्दों वाले static text से आगे रहता है; फिर छोटा एलिमेंट; फिर ऊपर से नीचे और बाएँ से दाएँ। एक एलिमेंट पर कार्रवाई करने वाले टूल पहला लेते हैं, और `matchCount` बताते हैं: 1 से ज़्यादा का मतलब है कि क्रम ने फ़ैसला किया। पक्का करने के लिए `id`, `role`, `exact` या `strict` जोड़ें।

**छोड़े गए।** जो एलिमेंट मेल खाते हैं पर इस्तेमाल नहीं किए जा सकते, वे `excluded` के नीचे `reason` के साथ सूचीबद्ध होते हैं: `hidden`, `empty-frame` (कोई साइज़ नहीं), `off-screen` (उसका केंद्र स्क्रीन के बाहर है), और टैप के लिए `disabled`।

**nodeId।** `nodeId` ऐप के एक एलिमेंट को बताता है, जैसा ऐप अभी चल रहा है। एलिमेंट के हटने, hidden होने, स्क्रीन से बाहर जाने, या ऐप के restart होने पर यह काम करना बंद कर देता है: तब tree फिर से पढ़ें। इसे opaque मानें और बाद के लिए न रखें।

**सेलेक्टर त्रुटियाँ** (कोई भी एलिमेंट टूल):

| संदेश | कब | क्या करें |
| --- | --- | --- |
| Name the element: text, id, value, role or nodeId. | कोई सेलेक्टर फ़ील्ड नहीं दिया गया | एक जोड़ें |
| invalid nodeId; use the opaque string returned by describe-ui | `nodeId` टूल्स का दिया हुआ नहीं है | इसे [simulator_describe_ui](https://air.build/hi/docs/mcp-tools/simulator_describe_ui/) से बिना बदले कॉपी करें |
| node_id_device_mismatch: nodeId belongs to a different device | `nodeId` किसी दूसरे Simulator का है | इस डिवाइस का tree पढ़ें |
| stale_node: _nodeId_ is absent, hidden, disabled, off-screen, or no longer matches; describe UI again | एलिमेंट हट गया या बदल गया | [simulator_describe_ui](https://air.build/hi/docs/mcp-tools/simulator_describe_ui/) फिर से कॉल करें |
| ambiguous selector _selector_: _n_ usable matches; add an id, role, or value filter | `strict` (या कोई `nodeId`) और कई एलिमेंट मेल खाते हैं | सेलेक्टर को और सटीक करें |
| no usable element matching _selector_ within _n_s | इंतज़ार करने वाले टूल को समय पर कुछ भी इस्तेमाल लायक नहीं मिला; जब कुछ मेल खाए पर इस्तेमाल नहीं हो सके, तो इसके बाद `(matched but skipped: 1 hidden, …)` आता है | `simulator_find` से जाँचें, [simulator_scroll_to](https://air.build/hi/docs/mcp-tools/simulator_scroll_to/) से scroll करें, या ज़्यादा देर इंतज़ार करें |

## इनपुट

| इनपुट | टाइप | ज़रूरी | डिफ़ॉल्ट | यह क्या करता है |
| --- | --- | --- | --- | --- |
| `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` से |
| `text`, `id`, `value`, `role`, `nodeId`, `exact`, `strict` | देखें [सेलेक्टर](https://air.build/hi/docs/mcp-tools/simulator_find/#selector) | पहले पाँच में से कम से कम एक | — | सेलेक्टर |

## नतीजा

| फ़ील्ड | मतलब |
| --- | --- |
| `ok` | `true` |
| `matches` | इस्तेमाल लायक एलिमेंट, सबसे अच्छा पहले; कोई न हो तो खाली |
| `matches[].element` | एलिमेंट: `label`, `value`, `identifier`, `nodeId`, `role`, `frame` (`x`, `y`, `width`, `height`), `enabled`, `interactive` (इनपुट लेता है), `hidden`, और कुछ कंट्रोल पर `activationPoint`, `sliderTrack`, `adjustable`, `adjustmentActions` |
| `matches[].point` | `x`, `y`: इस पर टैप कहाँ पड़ता है, [स्क्रीन कोऑर्डिनेट](https://air.build/hi/docs/mcp-tools/simulator_screen/#coordinates) में |
| `matches[].exact` | इसका टेक्स्ट query के बराबर है या नहीं (`id` के लिए हमेशा `true`) |
| `excluded` | वे एलिमेंट जो मेल खाए पर इस्तेमाल नहीं किए जा सकते |
| `excluded[].element` | एलिमेंट, ऊपर की तरह |
| `excluded[].reason` | `hidden`, `empty-frame`, `off-screen` या `disabled` |

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

## त्रुटियाँ

ऊपर दी गई [सेलेक्टर त्रुटियाँ](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_find", "arguments": {"teamId": "00000000-0000-0000-0000-000000000000", "text": "New note"}}
```
