Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions examples/canonical.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}
}
]
}
28 changes: 28 additions & 0 deletions examples/dotnet.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
28 changes: 28 additions & 0 deletions examples/go.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
28 changes: 28 additions & 0 deletions examples/java.json
Original file line number Diff line number Diff line change
Expand Up @@ -410,6 +410,34 @@
{
"code": "device.zoom(\"in\", \"\"); // \"\": about the middle of the screen"
}
],
"app_audit": [
{
"code": "Map<String, Object> found = device.audit();\nSystem.out.println(found.get(\"findings\"));"
}
],
"app_hit_test": [
{
"code": "Map<String, Object> hit = device.hitTest(\"testid=submit\");\nSystem.out.println(hit.get(\"reaches\"));"
}
],
"app_biometric": [
{
"code": "device.biometric(\"enroll\");"
},
{
"code": "Map<String, Object> said = device.biometric(\"match\");\nSystem.out.println(said.get(\"outcome\"));"
}
],
"app_boot": [
{
"code": "Map<String, Object> booted = device.boot(\"mobium-test\");\nSystem.out.println(booted.get(\"device\"));"
}
],
"app_shutdown": [
{
"code": "device.shutdown(\"mobium-test\");"
}
]
},
"members": {
Expand Down
28 changes: 28 additions & 0 deletions examples/javascript.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
5 changes: 5 additions & 0 deletions examples/no-picture.json
Original file line number Diff line number Diff line change
@@ -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.",
Expand All @@ -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.",
Expand All @@ -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.",
Expand Down
28 changes: 28 additions & 0 deletions examples/python.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
Loading