diff --git a/examples/canonical.json b/examples/canonical.json index ed7353d..cbc4a66 100644 --- a/examples/canonical.json +++ b/examples/canonical.json @@ -873,6 +873,14 @@ "condition": "checked", "timeout_ms": 5000 } + }, + { + "title": "Wait for a tab to be selected", + "cli": "mobium wait label=Cart --for selected", + "args": { + "target": "label=Cart", + "condition": "selected" + } } ], "app_zoom": [ diff --git a/examples/dotnet.json b/examples/dotnet.json index ad5b6c3..479a8af 100644 --- a/examples/dotnet.json +++ b/examples/dotnet.json @@ -436,6 +436,9 @@ }, { "code": "device.WaitFor(\"testid=termsCheck\", Until.Checked().Timeout(TimeSpan.FromSeconds(5)));" + }, + { + "code": "device.WaitFor(\"label=Cart\", Until.Selected());" } ], "app_zoom": [ diff --git a/examples/go.json b/examples/go.json index f1d7371..346ee9f 100644 --- a/examples/go.json +++ b/examples/go.json @@ -436,6 +436,9 @@ }, { "code": "opts := &mobium.WaitOptions{Condition: mobium.Checked, Timeout: 5 * time.Second}\nif _, err := dev.WaitFor(ctx, \"testid=termsCheck\", opts); err != nil {\n\treturn err\n}" + }, + { + "code": "if _, err := dev.WaitFor(ctx, \"label=Cart\", &mobium.WaitOptions{Condition: mobium.Selected}); err != nil {\n\treturn err\n}" } ], "app_zoom": [ diff --git a/examples/java.json b/examples/java.json index 533628f..b13ac9e 100644 --- a/examples/java.json +++ b/examples/java.json @@ -436,6 +436,9 @@ }, { "code": "device.waitFor(\"testid=termsCheck\", WaitFor.checked().timeout(Duration.ofSeconds(5)));" + }, + { + "code": "device.waitFor(\"label=Cart\", WaitFor.selected());" } ], "app_zoom": [ diff --git a/examples/javascript.json b/examples/javascript.json index 6d863f6..8276f36 100644 --- a/examples/javascript.json +++ b/examples/javascript.json @@ -436,6 +436,9 @@ }, { "code": "await device.waitFor('testid=termsCheck', { condition: 'checked', timeoutMs: 5000 })" + }, + { + "code": "await device.waitFor('label=Cart', { condition: 'selected' })" } ], "app_zoom": [ diff --git a/examples/python.json b/examples/python.json index 8b30e9e..65586ad 100644 --- a/examples/python.json +++ b/examples/python.json @@ -436,6 +436,9 @@ }, { "code": "device.wait_for(\"testid=termsCheck\", condition=\"checked\", timeout_ms=5000)" + }, + { + "code": "device.wait_for(\"label=Cart\", condition=\"selected\")" } ], "app_zoom": [