Skip to content

Commit 5420f99

Browse files
thymikeeclaude
andcommitted
docs(find): show the action as optional and default to click in help
Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
1 parent c0b1b15 commit 5420f99

3 files changed

Lines changed: 6 additions & 5 deletions

File tree

‎packages/command-surface/src/interaction/index.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -350,9 +350,9 @@ const interactionCliSchemas = {
350350
allowedFlags: [...SELECTOR_SNAPSHOT_FLAGS, 'record'],
351351
},
352352
find: {
353-
usageOverride: 'find <locator|text> <action> [value] [--first|--last]',
353+
usageOverride: 'find <locator|text> [action] [value] [--first|--last]',
354354
usageFlags: [],
355-
positionalArgs: ['query', 'action', 'value?'],
355+
positionalArgs: ['query', 'action?', 'value?'],
356356
allowsExtraPositionals: true,
357357
allowedFlags: ['snapshotDepth', 'snapshotRaw', 'findFirst', 'findLast', 'record'],
358358
},

‎packages/command-surface/src/interaction/metadata.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ const interactionCommandDescriptions = {
7777
'Scroll in a direction, or toward the top/bottom edge of scrollable content. Set until to a selector to reach an off-screen target in one command rather than a scroll-and-check loop. The optional amount is the finger-path fraction of the viewport axis, honored up to 0.8 of it; directional scrolls reduce release momentum, while app scroll physics determine the final content offset. A visible keyboard shortens the swiped band instead of being dismissed; when too little is left, the command refuses with scroll_keyboard_occludes_surface. A directional scroll also reports the movement it observed as movement: moved, at-edge, unchanged, or unobserved when the two reads could not back a claim either way; an unchanged surface inside a container that still hides content in that direction refuses with scroll_no_progress rather than repeating the requested distance. The movement field is absent where a tier verifies per pass (top/bottom, until), where the runtime cannot read a screen, or where a settle observation or a replay already owns that observation.',
7878
get: 'Read text or accessibility attributes from a snapshot ref or selector without changing the app. Use format text for visible content or attrs for the element attribute map.',
7979
is: 'Check whether a selector satisfies a UI predicate such as visible, hidden, exists, absent, editable, selected, focused, or text. `absent` passes only when one readable, complete, settled, unscoped, full-depth accessibility capture has zero matches. Use wait when the condition may appear asynchronously.',
80-
find: 'Find by text/label/value/role/id and run action. The role locator matches snapshot kind vocabulary (button, text, text-field, switch, ...); pre-reconciliation leaf spellings (statictext, edittext, textview) stay accepted on the nodes that carried them during a deprecation window.',
80+
find: 'Find by text/label/value/role/id and run action; the action defaults to click. The role locator matches snapshot kind vocabulary (button, text, text-field, switch, ...); pre-reconciliation leaf spellings (statictext, edittext, textview) stay accepted on the nodes that carried them during a deprecation window.',
8181
gesture:
8282
'Perform a structured pan, fling, swipe, pinch, rotate, transform, tap, or drag gesture. Select the gesture kind, then provide only the inputs that apply to that kind. A tap touches 2 to 5 points at once; repeat it with count and pauseMs.',
8383
} as const;

‎website/docs/docs/selectors.md‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,9 @@ agent-device find "Follow" list
1818

1919
## Find an element
2020

21-
`find <locator> <query> <action>` takes an optional locator (`text`, `label`, `value`, `role`, or
22-
`id`), the query, and an action. Without a locator it searches labels, values, and ids. Text
21+
`find <query> [action]` and `find <locator> <query> [action] [value]` take an optional locator
22+
(`text`, `label`, `value`, `role`, or `id`), the query, and an optional action; the action defaults to
23+
`click`. Without a locator it searches labels, values, and ids. Text
2324
matches ignore case, and a field containing the query matches too; an exact match wins over a
2425
partial one.
2526

0 commit comments

Comments
 (0)