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
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
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
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
Sets a matching field's value.
fill(selector: string, value: string, options?: CommandOptions): Promise<FillResult>androidApp.focus / press
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
Counts matching elements.
count(selector: string, options?: CommandOptions): Promise<CountResult>androidApp.textContent / innerText
Reads text from a matching element.
textContent(selector: string, options?: CommandOptions): Promise<TextResult>androidApp.waitForSelector
Waits, retrying, for an element to appear.
waitForSelector(selector: string, options?: WaitForSelectorOptions): Promise<WaitForSelectorResult>androidApp.screenshot
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
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
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