コンテンツにスキップ

assert_ui_state

Assert UI state matches expected value. Playwright-style expect/assertion that waits until condition is met or times out.

分類: テスト

名前 型 必須 既定値 説明
selector string 必須 U-Selector to find the target object (e.g., ‘#ScoreText’, ‘.Button’)
property string 必須 Property to check: text, active, enabled, visible, color, alpha, value, interactable. 値: text, active, enabled, visible, color, alpha, value, interactable
expected 必須 Expected value (string, boolean, number depending on property)
comparison string "equals" Comparison operator. 値: equals, contains, starts_with, ends_with, greater_than, less_than, not_equals
timeout number 5 Timeout in seconds
poll_interval number 0.1 Poll interval in seconds

必須の引数だけを入れています。ほかは必要に応じて足してください。

{
"name": "assert_ui_state",
"arguments": {
"selector": "…",
"property": "text",
"expected": "…"
}
}

Unity を NANORA_MCP_SUPERSAVE=1 で起動したときは、メタツール execute から {"tool": "assert_ui_state", "args": { … }} の形で呼びます。SuperSave モードを参照。

Assets/NanoraUnityMCP/Editor/Tools/AssertUiStateTool.cs(版 1.2.1)から生成しています。説明文はツール定義のまま(英語)です。AI クライアントは tools/list で同じスキーマを受け取ります。