Skip to main content
Obtain via [Machine.app], [Machine.fuzzyApp], [Machine.apps], or [Machine.defaultBrowser]. The handle stays bound to the machine it came from.

Constructor

Returns

App

Properties

null | string
required
Returns the canonical app name used for fuzzy matching (Android: the package name).
null | string
required
Returns the launch target used to open the app: a name or path locally, the package name on Android.

Methods

open()

Opens or switches to the application. If a URL is provided, the URL is opened with this app. focus_policy controls whether the app is allowed to become active/frontmost. Some applications (e.g. Chrome, Notes) ignore this request and steal focus regardless. visibility controls whether the app is launched hidden or shown; some applications (e.g. Chrome and other Chromium/Electron apps) ignore the hidden flag and launch visibly. Android’s activity model always launches visible and focused. When wait_for_load_complete is true, blocks until the instance has a window (or the platform reports launch finished), up to twenty seconds. Desktop timeouts are logged; Android treats them as errors. Pass false for apps that never show a window. If the app is already running, its existing windows satisfy the wait immediately — this does not wait for whatever window or tab the call may add.

Parameters

undefined | null | string
required
FocusPolicy
required
Visibility
required
boolean
required

Returns

Instance