allwright

API ReferenceTypeScriptMobile

Mobile

Android automation over adb — no Appium, no separate driver server. Reached through the mobile namespace; iOS has no runtime yet.

mobile.android.connect

MethodSince v0.0.45 – v0.0.52

Connects to a device or emulator over adb (by serial, or the first one available) and returns a device handle.

mobile.android.connect(options?: MobileAndroidConnectOptions): Promise<MobileAndroidDevice>

Example

const device = await mobile.android.connect({ appId: "com.example.airticket" });

MobileAndroidDevice.launch

MethodSince v0.0.45 – v0.0.52

Installs (from a local APK path or a URL) and launches an app, resolving the package from appId or the APK's own metadata.

launch(options?: MobileAndroidLaunchOptions): Promise<MobileAndroidApp>

androidApp.click

MethodSince v0.0.45 – v0.0.52

Taps the matching element.

click(selector: string, options?: CommandOptions): Promise<ClickResult>

Example

await androidApp.click('Id=com.example.airticket:id/bottom_nav_account');

androidApp.fill

MethodSince v0.0.45 – v0.0.52

Sets a matching field's value.

fill(selector: string, value: string, options?: CommandOptions): Promise<FillResult>

androidApp.focus / press

MethodSince v0.0.57 – v0.0.58

Focuses a matching element, or sends it a key event.

focus(selector: string, options?: CommandOptions): Promise<ElementResult>
press(selector: string, key: string, options?: PressOptions): Promise<PressResult>

androidApp.count

MethodSince v0.0.57 – v0.0.58

Counts matching elements.

count(selector: string, options?: CommandOptions): Promise<CountResult>

androidApp.textContent / innerText

MethodSince v0.0.57 – v0.0.58

Reads text from a matching element.

textContent(selector: string, options?: CommandOptions): Promise<TextResult>

androidApp.waitForSelector

MethodSince v0.0.57 – v0.0.58

Waits, retrying, for an element to appear.

waitForSelector(selector: string, options?: WaitForSelectorOptions): Promise<WaitForSelectorResult>

androidApp.screenshot

MethodSince v0.0.57 – v0.0.58

Captures the app UI as a PNG; a full-page capture stitches several scrolled captures into one image.

screenshot(options?: ScreenshotOptions): Promise<ScreenshotResult>

androidApp.accessibilitySnapshot

MethodSince v0.1.4

Captures a structured accessibility snapshot of the app UI — the same versioned JSON/YAML document shape as the web surface's snapshot.

accessibilitySnapshot(options?: AccessibilitySnapshotOptions): Promise<string>

androidApp.locator

MethodSince v0.0.45 – v0.0.52

Builds a chainable locator scoped to the app. Android has no getByRole-style semantic builders — only raw CSS/XPath/UiAutomator selectors.

locator(selector: string): MobileAndroidLocator