Skip to content

feat(skills): uno-testing asserts with uno_app_find_elements after an action, screenshot only for the eye - #185

Merged
kazo0 merged 1 commit into
mainfrom
dev/steve/uno-dev-find-elements
Oct 12, 2026
Merged

kazo0 merged 1 commit into
mainfrom
dev/steve/uno-dev-find-elements

Conversation

@kazo0

@kazo0 kazo0 commented Oct 9, 2026 •

Copy link
Copy Markdown
Contributor

Stacked on #184. Companion to unoplatform/uno.app-mcp#185 (uno_app_find_elements, servicing branch dev/sb/find-elements-1.4).

What

  • uno-testing: step 6 "Wait, then check, in one call": after an action, uno_app_find_elements(selector, waitForMs) on the element whose state should have changed, read from its {state} group (disabled, checked, selected, expanded, value=, items=, selectedIndex=, !hidden); zero matches asserts absence. Step 7 reads state from that group and keeps the DataContext for values it does not carry. New rule "Act, then find; screenshot only for the eye". The tool reference documents the parameters, the result shape and the three calls that replace the snapshot-and-read and screenshot-and-look loops; patterns and best practices follow.
  • uno-dev agent: the automation-id rule now says what the id is for after the action.
  • Top-level skills/ copies updated.

Why

In the 2026-10-08 FieldCheck sessions the Uno agent took 47 to 51 App MCP screenshots per session, 33 of them immediately after an element action with nothing in between: click, screenshot, look. Each costs an image in context and answers less than one find_elements line. The screenshots that remain are the visual comparisons against the reference and the deliverables.

Verification

skill-ab FieldCheck run fieldcheck-20261009-010927 (unoplatform/private#1188): this branch at d5eac40 with a local pack of dev/sb/find-elements-1.4 (1.4.0-local.2) installed as the Sdk's pin, two Uno sessions against two Flutter sessions, every harness check passing. Compared with the last comparable Uno session (fieldcheck-20261008-184637 A1, #184 without this branch: 117 images read into context, 51 App MCP screenshots, 5 snapshots, $31.94, 61 min):

A1 A2
cost / wall time $32.34 / 56 min $30.18 / 48 min
images read into context 85 55
uno_app_find_elements calls 119 105
visual-tree snapshots 3 2
App MCP screenshots 41 23
captures taken right after an action (App MCP or adb) 23 12

The agent asserted with find_elements and waitForMs as the skill says, took the one baseline snapshot, and took screenshots for the visual checks, the deliverables and, in A1, a seven-capture smoke of the trimmed Android Release build. What is left on Android is not the skill: on the API 36 emulator uno_app_get_screenshot fails or returns blank after a navigation, uno_app_pointer_click takes physical pixels while the reported bounds are logical, and the connection drops behind the system photo picker, so the agent captured and tapped through adb there (feedback for uno.app-mcp). Flutter in the same run: $11.65 / 35 min and $24.07 / 39 min.

🤖 Generated with Claude Code

https://claude.ai/code/session_01SYer42kcr3PXtoro9RDXEL

@kazo0
kazo0 added this pull request to stack #187 October 9, 2026 18:30
Base automatically changed from dev/steve/uno-dev-automation-ids to main October 12, 2026 11:19
@kazo0 kazo0 changed the title feat(uno-testing): assert with uno_app_find_elements after an action, screenshot only for the eye feat(skills): uno-testing asserts with uno_app_find_elements after an action, screenshot only for the eye Oct 12, 2026
@kazo0
kazo0 force-pushed the dev/steve/uno-dev-find-elements branch from d5eac40 to 1a901ad Compare October 12, 2026 11:20
… action, screenshot only for the eye

The check after an action becomes one find_elements call with waitForMs on the element whose state should
have changed, read from its {state} group, instead of a screenshot or a re-snapshot. Tool reference, steps,
patterns and rules updated; the uno-dev agent carries the rule. Needs the find_elements build of
Uno.UI.App.Mcp (unoplatform/uno.app-mcp#185, servicing branch dev/sb/find-elements-1.4).

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01SYer42kcr3PXtoro9RDXEL
@kazo0
kazo0 force-pushed the dev/steve/uno-dev-find-elements branch from 1a901ad to 995cb4a Compare October 12, 2026 11:54
@kazo0
kazo0 merged commit 750b5aa into main Oct 12, 2026
3 of 4 checks passed
@kazo0
kazo0 deleted the dev/steve/uno-dev-find-elements branch October 12, 2026 12:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants