From b1890c3c2bc85318fa9ccac9c40f57a35b5b9116 Mon Sep 17 00:00:00 2001 From: Lana Begunova <70295997+lana-20@users.noreply.github.com> Date: Thu, 1 Oct 2026 03:29:09 -0700 Subject: [PATCH] Examples for audit, hit-test, biometric, boot and shutdown, in every client The build had failed since 2026-09-30: three tools had no example. Each of the five has its scenario, its command and MCP arguments, and its code in all five clients, checked against each client's toolchain, and a reason it has no picture. --- examples/canonical.json | 50 ++++++++++++++++++++++++++++++++++++++++ examples/dotnet.json | 28 ++++++++++++++++++++++ examples/go.json | 28 ++++++++++++++++++++++ examples/java.json | 28 ++++++++++++++++++++++ examples/javascript.json | 28 ++++++++++++++++++++++ examples/no-picture.json | 5 ++++ examples/python.json | 28 ++++++++++++++++++++++ 7 files changed, 195 insertions(+) diff --git a/examples/canonical.json b/examples/canonical.json index de2b32c..af36f79 100644 --- a/examples/canonical.json +++ b/examples/canonical.json @@ -799,5 +799,55 @@ "direction": "in" } } + ], + "app_audit": [ + { + "title": "Run the platform's own accessibility audit on the screen in front", + "cli": "mobium audit", + "args": {} + } + ], + "app_hit_test": [ + { + "title": "Ask where a tap on an element would really land", + "cli": "mobium hit-test testid=submit", + "args": { + "target": "testid=submit" + } + } + ], + "app_biometric": [ + { + "title": "Enroll a face or a finger", + "cli": "mobium biometric enroll", + "args": { + "action": "enroll" + } + }, + { + "title": "Present a matching one to the prompt that is up", + "cli": "mobium biometric match", + "args": { + "action": "match" + } + } + ], + "app_boot": [ + { + "title": "Boot an emulator by its AVD's name, and wait until it is up", + "cli": "mobium boot mobium-test", + "args": { + "name": "mobium-test" + } + } + ], + "app_shutdown": [ + { + "title": "Shut it down, its session ended first", + "cli": "mobium shutdown mobium-test", + "args": { + "name": "mobium-test" + } + } ] } diff --git a/examples/dotnet.json b/examples/dotnet.json index bf8b6da..38091c4 100644 --- a/examples/dotnet.json +++ b/examples/dotnet.json @@ -410,6 +410,34 @@ { "code": "device.Zoom(\"in\");" } + ], + "app_audit": [ + { + "code": "var found = device.Audit();\nConsole.WriteLine(found[\"findings\"]);" + } + ], + "app_hit_test": [ + { + "code": "var hit = device.HitTest(\"testid=submit\");\nConsole.WriteLine(hit[\"reaches\"]);" + } + ], + "app_biometric": [ + { + "code": "device.Biometric(\"enroll\");" + }, + { + "code": "var said = device.Biometric(\"match\");\nConsole.WriteLine(said[\"outcome\"]);" + } + ], + "app_boot": [ + { + "code": "var booted = device.Boot(\"mobium-test\");\nConsole.WriteLine(booted[\"device\"]);" + } + ], + "app_shutdown": [ + { + "code": "device.Shutdown(\"mobium-test\");" + } ] }, "members": { diff --git a/examples/go.json b/examples/go.json index d3a6dee..3c8484d 100644 --- a/examples/go.json +++ b/examples/go.json @@ -410,6 +410,34 @@ { "code": "// true pinches out, which zooms in; \"\" is the middle of the screen.\nif err := dev.Zoom(ctx, true, \"\"); err != nil {\n\treturn err\n}" } + ], + "app_audit": [ + { + "code": "found, err := dev.Audit(ctx)\nif err != nil {\n\treturn err\n}\nfor _, f := range found.Findings {\n\tfmt.Println(f.Type, f.Summary)\n}" + } + ], + "app_hit_test": [ + { + "code": "hit, err := dev.HitTest(ctx, \"testid=submit\")\nif err != nil {\n\treturn err\n}\nfmt.Println(hit.Reaches)" + } + ], + "app_biometric": [ + { + "code": "if _, err := dev.Biometric(ctx, \"enroll\"); err != nil {\n\treturn err\n}" + }, + { + "code": "said, err := dev.Biometric(ctx, \"match\")\nif err != nil {\n\treturn err\n}\nfmt.Println(said.Outcome)" + } + ], + "app_boot": [ + { + "code": "booted, err := dev.Boot(ctx, \"mobium-test\", false)\nif err != nil {\n\treturn err\n}\nfmt.Println(booted.Device)" + } + ], + "app_shutdown": [ + { + "code": "if err := dev.Shutdown(ctx, \"mobium-test\"); err != nil {\n\treturn err\n}" + } ] }, "members": { diff --git a/examples/java.json b/examples/java.json index 8f86de1..90ba203 100644 --- a/examples/java.json +++ b/examples/java.json @@ -410,6 +410,34 @@ { "code": "device.zoom(\"in\", \"\"); // \"\": about the middle of the screen" } + ], + "app_audit": [ + { + "code": "Map found = device.audit();\nSystem.out.println(found.get(\"findings\"));" + } + ], + "app_hit_test": [ + { + "code": "Map hit = device.hitTest(\"testid=submit\");\nSystem.out.println(hit.get(\"reaches\"));" + } + ], + "app_biometric": [ + { + "code": "device.biometric(\"enroll\");" + }, + { + "code": "Map said = device.biometric(\"match\");\nSystem.out.println(said.get(\"outcome\"));" + } + ], + "app_boot": [ + { + "code": "Map booted = device.boot(\"mobium-test\");\nSystem.out.println(booted.get(\"device\"));" + } + ], + "app_shutdown": [ + { + "code": "device.shutdown(\"mobium-test\");" + } ] }, "members": { diff --git a/examples/javascript.json b/examples/javascript.json index fa18ebf..d91f4da 100644 --- a/examples/javascript.json +++ b/examples/javascript.json @@ -410,6 +410,34 @@ { "code": "await device.zoom('in')" } + ], + "app_audit": [ + { + "code": "const found = await device.audit()\nconsole.log(found.findings)" + } + ], + "app_hit_test": [ + { + "code": "const hit = await device.hitTest('testid=submit')\nconsole.log(hit.reaches)" + } + ], + "app_biometric": [ + { + "code": "await device.biometric('enroll')" + }, + { + "code": "const said = await device.biometric('match')\nconsole.log(said.outcome)" + } + ], + "app_boot": [ + { + "code": "const booted = await device.boot('mobium-test')\nconsole.log(booted.device)" + } + ], + "app_shutdown": [ + { + "code": "await device.shutdown('mobium-test')" + } ] }, "members": { diff --git a/examples/no-picture.json b/examples/no-picture.json index 9ce9aef..b1ea093 100644 --- a/examples/no-picture.json +++ b/examples/no-picture.json @@ -1,6 +1,9 @@ { "apps": "it lists what is installed, and nothing on the screen changes.", + "audit": "it reads the platform's audit of the screen, and nothing on the screen changes.", "background": "the app is off the screen for the seconds it is away, and back in front when the command returns.", + "biometric": "what it presents goes to a prompt the app put up, and the app's own screen says what it made of it.", + "boot": "it starts a device, which has no screen of its own until it is up.", "clear-data": "it deletes an app's data, which shows only the next time the app starts.", "crashes": "it reads the device's crash reports, and nothing on the screen changes.", "current": "it names the app in front, and nothing on the screen changes.", @@ -12,6 +15,7 @@ "devices": "it lists the devices this machine can see.", "doctor": "it checks this machine, and needs no device.", "grant": "it changes what an app may do, not what is on the screen; the next dialog that does not appear is the evidence.", + "hit-test": "it asks where a tap would land, and nothing on the screen changes.", "install": "it installs an app, which shows nowhere until the app is launched.", "lock": "a locked emulator's screen is off, so its screenshot is black.", "logs": "it reads a log, and nothing on the screen changes.", @@ -20,6 +24,7 @@ "revoke": "it changes what an app may do, not what is on the screen.", "session": "a session is the connection to the device, and the screen shows nothing of it.", "shake": "an emulator shows nothing for a shake; whether the app reacts is up to the app.", + "shutdown": "it stops a device, which then has no screen.", "source": "it reads the hierarchy, and nothing on the screen changes.", "state": "it reads whether an app is running, and nothing on the screen changes.", "time": "it reads the device's clock, and nothing on the screen changes.", diff --git a/examples/python.json b/examples/python.json index 2597e28..1f6ce7a 100644 --- a/examples/python.json +++ b/examples/python.json @@ -410,6 +410,34 @@ { "code": "device.zoom(\"in\")" } + ], + "app_audit": [ + { + "code": "found = device.audit()\nfor f in found[\"findings\"]:\n print(f[\"type\"], f[\"summary\"])" + } + ], + "app_hit_test": [ + { + "code": "hit = device.hit_test(\"testid=submit\")\nprint(hit[\"reaches\"])" + } + ], + "app_biometric": [ + { + "code": "device.biometric(\"enroll\")" + }, + { + "code": "said = device.biometric(\"match\")\nprint(said[\"outcome\"])" + } + ], + "app_boot": [ + { + "code": "booted = device.boot(\"mobium-test\")\nprint(booted[\"device\"])" + } + ], + "app_shutdown": [ + { + "code": "device.shutdown(\"mobium-test\")" + } ] }, "members": {