本文へスキップ
すべてのツール

ui_wait_for_element

画面、ウインドウ、UI · macOS · Windows

効果: 読み取り. 状態: 条件付き提供.

「条件付き提供」は、バージョン、プラットフォーム、権限、アカウント、設定に依存する可能性を示し、すべての環境で有効という意味ではありません。

macOS

目的

すべての sleep の代わりとなる決定的な同期です。要素が state(present|enabled|focused|absent)に達するかタイムアウトまでポーリングします。タイムアウトは明示的エラーで、偽の成功にはなりません。{satisfied, waited_ms, element_ref?, bounds?, role?, label?, enabled_unknown?} を返します。state:'enabled' はアプリが AXEnabled=false を公開しない限り成立します。アプリが AXEnabled をまったく公開していない場合、結果には enabled_unknown:true が付きます。待機はブロックしませんでしたが、有効かどうかは実際には何も確認されていません。

必須入力

このプラットフォームのスキーマには必須入力が宣言されていません。任意の選択項目や実行要件が存在する場合があります。

権限と確認

スキーマには明示的な確認パラメータがありません。これは無許可の操作を認めるものではありません。効果を確認し、承認を得てください。

英語の正規技術スキーマ — macOS
{
  "properties": {
    "app_bundle_id": {
      "description": "Bundle id of the app to look in (e.g. com.apple.Safari). Narrows the search and makes it faster.",
      "type": "string"
    },
    "label": {
      "description": "Visible label or title of the element.",
      "type": "string"
    },
    "match": {
      "description": "How to compare label: \"exact\" (default) or \"contains\".",
      "enum": [
        "exact",
        "contains"
      ],
      "type": "string"
    },
    "poll_ms": {
      "description": "Default 150.",
      "type": "integer"
    },
    "role": {
      "description": "Accessibility role of the element (e.g. AXButton, AXTextField).",
      "type": "string"
    },
    "state": {
      "description": "Default present.",
      "enum": [
        "present",
        "enabled",
        "focused",
        "absent"
      ],
      "type": "string"
    },
    "timeout_ms": {
      "description": "Default 5000.",
      "type": "integer"
    },
    "window_id": {
      "description": "Window to look in, from list_windows. Narrows the search to one window.",
      "type": "string"
    }
  },
  "required": [],
  "type": "object"
}

ドキュメント例

ui_wait_for_element のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。

{
  "label": "Save"
}

Windows

目的

固定 sleep の代わりとなる決定的な同期です。要素が state(present|enabled|focused|absent)に達するかタイムアウトまでポーリングします。タイムアウトは明示的エラーで、偽の成功にはなりません。{satisfied, waited_ms, element_ref?, bounds?} を返します。

必須入力

このプラットフォームのスキーマには必須入力が宣言されていません。任意の選択項目や実行要件が存在する場合があります。

権限と確認

スキーマには明示的な確認パラメータがありません。これは無許可の操作を認めるものではありません。効果を確認し、承認を得てください。

英語の正規技術スキーマ — Windows
{
  "properties": {
    "app": {
      "description": "Scope to this app: process name (e.g. notepad) or a window-title substring.",
      "type": "string"
    },
    "label": {
      "description": "Name/HelpText/Value to match.",
      "type": "string"
    },
    "match": {
      "description": "Default contains.",
      "enum": [
        "exact",
        "contains"
      ],
      "type": "string"
    },
    "poll_ms": {
      "description": "Default 150.",
      "type": "integer"
    },
    "role": {
      "description": "UIA control type, e.g. Button, Edit, MenuItem, CheckBox.",
      "type": "string"
    },
    "state": {
      "description": "Default present.",
      "enum": [
        "present",
        "enabled",
        "focused",
        "absent"
      ],
      "type": "string"
    },
    "timeout_ms": {
      "description": "Default 5000.",
      "type": "integer"
    }
  },
  "required": [],
  "type": "object"
}

ドキュメント例

ui_wait_for_element のドキュメント例です。この例は実行しないでください。表示される引数は架空のデータセットに属します。実際に呼び出す前に実在する識別子を確認し、承認を得てください。

{
  "label": "Save"
}