Skip to content

Commit 606ae3e

Browse files
committed
app_check is app_set: set and unset, re-captured
Mobium renamed its checkbox tool (mobiumdev/mobium#280): app_check is app_set, its argument value, the CLI's verbs set and unset, and each client's methods set and unset. The examples follow in every language, the two runs are captured again on an Android 15 emulator with the new verbs, and so is the wait that ticks the box first. A .NET example of NotConfirmedException and two guides still named the old call.
1 parent 1abc7d3 commit 606ae3e

12 files changed

Lines changed: 45 additions & 45 deletions

‎data/runs.json‎

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -196,23 +196,13 @@
196196
"output": "com.android.shell Mobium — Your code is 123456\nandroid Serial console enabled — Performance is impacted. To disable, check bootloader.",
197197
"after": "/img/shots/app_notifications-1-after.jpg"
198198
},
199-
"app_check[0]": {
200-
"tool": "app_check",
201-
"index": 0,
202-
"before": "/img/shots/app_check-0-before.jpg",
203-
"command": "mobium check testid=termsCheck",
204-
"verbatim": true,
205-
"exit": 0,
206-
"output": "testid=termsCheck is now checked",
207-
"after": "/img/shots/app_check-0-after.jpg"
208-
},
209199
"app_wait_for[2]": {
210200
"tool": "app_wait_for",
211201
"index": 2,
212202
"command": "mobium wait testid=termsCheck --for checked --timeout 5s",
213203
"verbatim": true,
214204
"exit": 0,
215-
"output": "testid=termsCheck is checked after 18ms — @e3 Accept terms (checkbox, checked)"
205+
"output": "testid=termsCheck is checked after 29ms — @e3 Accept terms (checkbox, checked)"
216206
},
217207
"app_fill:fill testid=username mobium": {
218208
"tool": "app_fill",
@@ -587,16 +577,6 @@
587577
"output": "no cookies for about:blank",
588578
"after": "/img/shots/app_cookies-0-after.jpg"
589579
},
590-
"app_check:uncheck testid=termsCheck": {
591-
"tool": "app_check",
592-
"index": null,
593-
"before": "/img/shots/app_check-uncheck-testid-termscheck-before.jpg",
594-
"command": "mobium uncheck testid=termsCheck",
595-
"verbatim": false,
596-
"exit": 0,
597-
"output": "testid=termsCheck is now unchecked",
598-
"after": "/img/shots/app_check-uncheck-testid-termscheck-after.jpg"
599-
},
600580
"app_open_url:open https://en.wikipedia.org/wiki/Mobile_app": {
601581
"tool": "app_open_url",
602582
"index": null,
@@ -818,5 +798,25 @@
818798
"verbatim": true,
819799
"exit": 0,
820800
"output": "TalkBack said, since listening started: \"Live cart: 1\" — Live cart: 1, not in map [a change on screen]"
801+
},
802+
"app_set[0]": {
803+
"tool": "app_set",
804+
"index": 0,
805+
"before": "/img/shots/app_set-0-before.jpg",
806+
"command": "mobium set testid=termsCheck",
807+
"verbatim": true,
808+
"exit": 0,
809+
"output": "testid=termsCheck is now checked",
810+
"after": "/img/shots/app_set-0-after.jpg"
811+
},
812+
"app_set:unset testid=termsCheck": {
813+
"tool": "app_set",
814+
"index": null,
815+
"before": "/img/shots/app_set-unset-testid-termscheck-before.jpg",
816+
"command": "mobium unset testid=termsCheck",
817+
"verbatim": false,
818+
"exit": 0,
819+
"output": "testid=termsCheck is now unchecked",
820+
"after": "/img/shots/app_set-unset-testid-termscheck-after.jpg"
821821
}
822822
}

‎examples/canonical.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -122,20 +122,20 @@
122122
}
123123
}
124124
],
125-
"app_check": [
125+
"app_set": [
126126
{
127127
"title": "Tick a checkbox, whatever state it is in",
128-
"cli": "mobium check testid=termsCheck",
128+
"cli": "mobium set testid=termsCheck",
129129
"args": {
130130
"target": "testid=termsCheck"
131131
}
132132
},
133133
{
134134
"title": "Turn a switch off",
135-
"cli": "mobium uncheck @e4",
135+
"cli": "mobium unset @e4",
136136
"args": {
137137
"target": "@e4",
138-
"checked": false
138+
"value": false
139139
}
140140
}
141141
],

‎examples/dotnet.json‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
"code": "device.IncomingCall(\"hang\");"
5656
}
5757
],
58-
"app_check": [
58+
"app_set": [
5959
{
60-
"code": "device.Check(\"testid=termsCheck\");"
60+
"code": "device.Set(\"testid=termsCheck\");"
6161
},
6262
{
63-
"code": "device.Check(\"@e4\", false);"
63+
"code": "device.Unset(\"@e4\");"
6464
}
6565
],
6666
"app_clear_data": [
@@ -673,7 +673,7 @@
673673
"NotConfirmedException": [
674674
{
675675
"title": "Notice an action the device did not confirm",
676-
"code": "try { device.Check(\"@e4\"); }\ncatch (NotConfirmedException e) { Console.WriteLine(e.Details.Count); }"
676+
"code": "try { device.Set(\"@e4\"); }\ncatch (NotConfirmedException e) { Console.WriteLine(e.Details.Count); }"
677677
}
678678
],
679679
"Until": [

‎examples/go.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
"code": "if err := dev.IncomingCall(ctx, \"hang\", \"\"); err != nil {\n\treturn err\n}"
5656
}
5757
],
58-
"app_check": [
58+
"app_set": [
5959
{
60-
"code": "if err := dev.Check(ctx, \"testid=termsCheck\", true); err != nil {\n\treturn err\n}"
60+
"code": "if err := dev.Set(ctx, \"testid=termsCheck\", true); err != nil {\n\treturn err\n}"
6161
},
6262
{
63-
"code": "if err := dev.Check(ctx, \"@e4\", false); err != nil {\n\treturn err\n}"
63+
"code": "if err := dev.Unset(ctx, \"@e4\"); err != nil {\n\treturn err\n}"
6464
}
6565
],
6666
"app_clear_data": [

‎examples/java.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
"code": "device.incomingCall(\"hang\");"
5656
}
5757
],
58-
"app_check": [
58+
"app_set": [
5959
{
60-
"code": "device.check(\"testid=termsCheck\", true); // does nothing if it is already ticked"
60+
"code": "device.set(\"testid=termsCheck\", true); // does nothing if it is already ticked"
6161
},
6262
{
63-
"code": "device.check(\"@e4\", false);"
63+
"code": "device.unset(\"@e4\");"
6464
}
6565
],
6666
"app_clear_data": [

‎examples/javascript.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
"code": "await device.incomingCall('hang')"
5656
}
5757
],
58-
"app_check": [
58+
"app_set": [
5959
{
60-
"code": "await device.check('testid=termsCheck')"
60+
"code": "await device.set('testid=termsCheck')"
6161
},
6262
{
63-
"code": "await device.check('@e4', false)"
63+
"code": "await device.unset('@e4')"
6464
}
6565
],
6666
"app_clear_data": [

‎examples/python.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,12 @@
5555
"code": "device.incoming_call(\"hang\")"
5656
}
5757
],
58-
"app_check": [
58+
"app_set": [
5959
{
60-
"code": "device.check(\"testid=termsCheck\")"
60+
"code": "device.set(\"testid=termsCheck\")"
6161
},
6262
{
63-
"code": "device.check(\"@e4\", checked=False)"
63+
"code": "device.unset(\"@e4\")"
6464
}
6565
],
6666
"app_clear_data": [

‎scripts/capture.py‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,8 +104,8 @@ def app_screen(name):
104104
restore=["accessibility bold_text off"]),
105105
dict(tool="app_notifications", i=0, setup=cleared_shade()),
106106
dict(tool="app_notifications", i=1, after=True, restore=["notifications --shade close"]),
107-
dict(tool="app_check", i=0, setup=app_screen("Form Demo"), before=True, after=True),
108-
dict(tool="app_wait_for", i=2, setup=app_screen("Form Demo") + ["check testid=termsCheck"]),
107+
dict(tool="app_set", i=0, setup=app_screen("Form Demo"), before=True, after=True),
108+
dict(tool="app_wait_for", i=2, setup=app_screen("Form Demo") + ["set testid=termsCheck"]),
109109
dict(tool="app_fill", i=None, cmd="fill testid=username mobium", setup=app_screen("Login Demo"), after=True),
110110
dict(tool="app_keyboard", i=0, setup=app_screen("Login Demo") + ["tap testid=username"], after=True),
111111
# The keyboard slides in after the tap; the pause lets the picture show it up.
@@ -228,8 +228,8 @@ def app_screen(name):
228228
"`mobium tap testid=oneButtonBtn` met the Discard dialog in its way, pressed Keep Editing, and "
229229
"went on — its own alert is up, and the line under the title says what the app received — "
230230
"on an Android 15 emulator"),
231-
dict(tool="app_check", i=None, cmd="uncheck testid=termsCheck",
232-
setup=app_screen("Form Demo") + ["check testid=termsCheck"], before=True, after=True),
231+
dict(tool="app_set", i=None, cmd="unset testid=termsCheck",
232+
setup=app_screen("Form Demo") + ["set testid=termsCheck"], before=True, after=True),
233233
dict(tool="app_open_url", i=None, cmd="open https://en.wikipedia.org/wiki/Mobile_app",
234234
setup=["terminate org.wikipedia"], after=True, pause=3.0, restore=["terminate org.wikipedia"]),
235235
# A file sent to the device, then picked in MobiumApp's Files Demo, which
Loading
Loading

0 commit comments

Comments
 (0)