ApplesauceOS
Read Markdown ↗Download .md

UIHelper.tap

Wait for a visible, enabled element and tap once.

js
ui.tap(selector, optionsOrTimeout?)

Arguments

ArgumentTypeMeaning
selectorobject | stringAttribute filters; a string means {name: string}. See the UIHelper guide for selectors.
optionsOrTimeoutobject | numberOptional milliseconds, or {timeout:5000, interval:100, throwOnTimeout:true}. Interval is at least 10 ms.

Returns

Tapped element for chaining; null on optional timeout.

Example

js
const ui = UIHelper.forApp("com.example.app");
ui.tap({id: "continueButton"}, 5000);
ui.waitForElement({id: "nextScreen", visible: true}, 5000);

Notes

Replace example identifiers with selectors verified in your app. Pinning an app does not open it. Acknowledged tap does not prove navigation completed. Actions are not automatically replayed.

All JavaScript APIs · Automation playbook