diff --git a/data/runs.json b/data/runs.json index 296ce52..a463d51 100644 --- a/data/runs.json +++ b/data/runs.json @@ -196,23 +196,13 @@ "output": "com.android.shell Mobium — Your code is 123456\nandroid Serial console enabled — Performance is impacted. To disable, check bootloader.", "after": "/img/shots/app_notifications-1-after.jpg" }, - "app_check[0]": { - "tool": "app_check", - "index": 0, - "before": "/img/shots/app_check-0-before.jpg", - "command": "mobium check testid=termsCheck", - "verbatim": true, - "exit": 0, - "output": "testid=termsCheck is now checked", - "after": "/img/shots/app_check-0-after.jpg" - }, "app_wait_for[2]": { "tool": "app_wait_for", "index": 2, "command": "mobium wait testid=termsCheck --for checked --timeout 5s", "verbatim": true, "exit": 0, - "output": "testid=termsCheck is checked after 18ms — @e3 Accept terms (checkbox, checked)" + "output": "testid=termsCheck is checked after 29ms — @e3 Accept terms (checkbox, checked)" }, "app_fill:fill testid=username mobium": { "tool": "app_fill", @@ -587,16 +577,6 @@ "output": "no cookies for about:blank", "after": "/img/shots/app_cookies-0-after.jpg" }, - "app_check:uncheck testid=termsCheck": { - "tool": "app_check", - "index": null, - "before": "/img/shots/app_check-uncheck-testid-termscheck-before.jpg", - "command": "mobium uncheck testid=termsCheck", - "verbatim": false, - "exit": 0, - "output": "testid=termsCheck is now unchecked", - "after": "/img/shots/app_check-uncheck-testid-termscheck-after.jpg" - }, "app_open_url:open https://en.wikipedia.org/wiki/Mobile_app": { "tool": "app_open_url", "index": null, @@ -818,5 +798,25 @@ "verbatim": true, "exit": 0, "output": "TalkBack said, since listening started: \"Live cart: 1\" — Live cart: 1, not in map [a change on screen]" + }, + "app_set[0]": { + "tool": "app_set", + "index": 0, + "before": "/img/shots/app_set-0-before.jpg", + "command": "mobium set testid=termsCheck", + "verbatim": true, + "exit": 0, + "output": "testid=termsCheck is now checked", + "after": "/img/shots/app_set-0-after.jpg" + }, + "app_set:unset testid=termsCheck": { + "tool": "app_set", + "index": null, + "before": "/img/shots/app_set-unset-testid-termscheck-before.jpg", + "command": "mobium unset testid=termsCheck", + "verbatim": false, + "exit": 0, + "output": "testid=termsCheck is now unchecked", + "after": "/img/shots/app_set-unset-testid-termscheck-after.jpg" } } diff --git a/examples/canonical.json b/examples/canonical.json index 825f68c..f1dff02 100644 --- a/examples/canonical.json +++ b/examples/canonical.json @@ -122,20 +122,20 @@ } } ], - "app_check": [ + "app_set": [ { "title": "Tick a checkbox, whatever state it is in", - "cli": "mobium check testid=termsCheck", + "cli": "mobium set testid=termsCheck", "args": { "target": "testid=termsCheck" } }, { "title": "Turn a switch off", - "cli": "mobium uncheck @e4", + "cli": "mobium unset @e4", "args": { "target": "@e4", - "checked": false + "value": false } } ], diff --git a/examples/dotnet.json b/examples/dotnet.json index 43c2b4d..865a99d 100644 --- a/examples/dotnet.json +++ b/examples/dotnet.json @@ -55,12 +55,12 @@ "code": "device.IncomingCall(\"hang\");" } ], - "app_check": [ + "app_set": [ { - "code": "device.Check(\"testid=termsCheck\");" + "code": "device.Set(\"testid=termsCheck\");" }, { - "code": "device.Check(\"@e4\", false);" + "code": "device.Unset(\"@e4\");" } ], "app_clear_data": [ @@ -673,7 +673,7 @@ "NotConfirmedException": [ { "title": "Notice an action the device did not confirm", - "code": "try { device.Check(\"@e4\"); }\ncatch (NotConfirmedException e) { Console.WriteLine(e.Details.Count); }" + "code": "try { device.Set(\"@e4\"); }\ncatch (NotConfirmedException e) { Console.WriteLine(e.Details.Count); }" } ], "Until": [ diff --git a/examples/go.json b/examples/go.json index 4187aa2..fd3c24f 100644 --- a/examples/go.json +++ b/examples/go.json @@ -55,12 +55,12 @@ "code": "if err := dev.IncomingCall(ctx, \"hang\", \"\"); err != nil {\n\treturn err\n}" } ], - "app_check": [ + "app_set": [ { - "code": "if err := dev.Check(ctx, \"testid=termsCheck\", true); err != nil {\n\treturn err\n}" + "code": "if err := dev.Set(ctx, \"testid=termsCheck\", true); err != nil {\n\treturn err\n}" }, { - "code": "if err := dev.Check(ctx, \"@e4\", false); err != nil {\n\treturn err\n}" + "code": "if err := dev.Unset(ctx, \"@e4\"); err != nil {\n\treturn err\n}" } ], "app_clear_data": [ diff --git a/examples/java.json b/examples/java.json index 6822f1f..1a84f83 100644 --- a/examples/java.json +++ b/examples/java.json @@ -55,12 +55,12 @@ "code": "device.incomingCall(\"hang\");" } ], - "app_check": [ + "app_set": [ { - "code": "device.check(\"testid=termsCheck\", true); // does nothing if it is already ticked" + "code": "device.set(\"testid=termsCheck\", true); // does nothing if it is already ticked" }, { - "code": "device.check(\"@e4\", false);" + "code": "device.unset(\"@e4\");" } ], "app_clear_data": [ diff --git a/examples/javascript.json b/examples/javascript.json index a4c09f7..550bea0 100644 --- a/examples/javascript.json +++ b/examples/javascript.json @@ -55,12 +55,12 @@ "code": "await device.incomingCall('hang')" } ], - "app_check": [ + "app_set": [ { - "code": "await device.check('testid=termsCheck')" + "code": "await device.set('testid=termsCheck')" }, { - "code": "await device.check('@e4', false)" + "code": "await device.unset('@e4')" } ], "app_clear_data": [ diff --git a/examples/python.json b/examples/python.json index 7e88cff..9afb279 100644 --- a/examples/python.json +++ b/examples/python.json @@ -55,12 +55,12 @@ "code": "device.incoming_call(\"hang\")" } ], - "app_check": [ + "app_set": [ { - "code": "device.check(\"testid=termsCheck\")" + "code": "device.set(\"testid=termsCheck\")" }, { - "code": "device.check(\"@e4\", checked=False)" + "code": "device.unset(\"@e4\")" } ], "app_clear_data": [ diff --git a/scripts/capture.py b/scripts/capture.py index 14e6dfa..a07909a 100644 --- a/scripts/capture.py +++ b/scripts/capture.py @@ -104,8 +104,8 @@ def app_screen(name): restore=["accessibility bold_text off"]), dict(tool="app_notifications", i=0, setup=cleared_shade()), dict(tool="app_notifications", i=1, after=True, restore=["notifications --shade close"]), - dict(tool="app_check", i=0, setup=app_screen("Form Demo"), before=True, after=True), - dict(tool="app_wait_for", i=2, setup=app_screen("Form Demo") + ["check testid=termsCheck"]), + dict(tool="app_set", i=0, setup=app_screen("Form Demo"), before=True, after=True), + dict(tool="app_wait_for", i=2, setup=app_screen("Form Demo") + ["set testid=termsCheck"]), dict(tool="app_fill", i=None, cmd="fill testid=username mobium", setup=app_screen("Login Demo"), after=True), dict(tool="app_keyboard", i=0, setup=app_screen("Login Demo") + ["tap testid=username"], after=True), # The keyboard slides in after the tap; the pause lets the picture show it up. @@ -228,8 +228,8 @@ def app_screen(name): "`mobium tap testid=oneButtonBtn` met the Discard dialog in its way, pressed Keep Editing, and " "went on — its own alert is up, and the line under the title says what the app received — " "on an Android 15 emulator"), - dict(tool="app_check", i=None, cmd="uncheck testid=termsCheck", - setup=app_screen("Form Demo") + ["check testid=termsCheck"], before=True, after=True), + dict(tool="app_set", i=None, cmd="unset testid=termsCheck", + setup=app_screen("Form Demo") + ["set testid=termsCheck"], before=True, after=True), dict(tool="app_open_url", i=None, cmd="open https://en.wikipedia.org/wiki/Mobile_app", setup=["terminate org.wikipedia"], after=True, pause=3.0, restore=["terminate org.wikipedia"]), # A file sent to the device, then picked in MobiumApp's Files Demo, which diff --git a/static/img/shots/app_check-0-after.jpg b/static/img/shots/app_set-0-after.jpg similarity index 93% rename from static/img/shots/app_check-0-after.jpg rename to static/img/shots/app_set-0-after.jpg index 6827c7d..5c0aed5 100644 Binary files a/static/img/shots/app_check-0-after.jpg and b/static/img/shots/app_set-0-after.jpg differ diff --git a/static/img/shots/app_check-0-before.jpg b/static/img/shots/app_set-0-before.jpg similarity index 93% rename from static/img/shots/app_check-0-before.jpg rename to static/img/shots/app_set-0-before.jpg index c42c590..841383c 100644 Binary files a/static/img/shots/app_check-0-before.jpg and b/static/img/shots/app_set-0-before.jpg differ diff --git a/static/img/shots/app_check-uncheck-testid-termscheck-after.jpg b/static/img/shots/app_set-unset-testid-termscheck-after.jpg similarity index 93% rename from static/img/shots/app_check-uncheck-testid-termscheck-after.jpg rename to static/img/shots/app_set-unset-testid-termscheck-after.jpg index 96a86b5..8136a4d 100644 Binary files a/static/img/shots/app_check-uncheck-testid-termscheck-after.jpg and b/static/img/shots/app_set-unset-testid-termscheck-after.jpg differ diff --git a/static/img/shots/app_check-uncheck-testid-termscheck-before.jpg b/static/img/shots/app_set-unset-testid-termscheck-before.jpg similarity index 93% rename from static/img/shots/app_check-uncheck-testid-termscheck-before.jpg rename to static/img/shots/app_set-unset-testid-termscheck-before.jpg index 6827c7d..5c0aed5 100644 Binary files a/static/img/shots/app_check-uncheck-testid-termscheck-before.jpg and b/static/img/shots/app_set-unset-testid-termscheck-before.jpg differ