Skip to main content

Mobile automation (Android)

Trq records and replays native Android app flows the same way it does the web — in the same desktop studio, with the same panels, the same self-healing selectors, and the same shareable reports. You perform the flow once in a live Android emulator; Trq captures it as a structured .trq session and replays it deterministically, forever.

Mobile is a structural twin of web. A mobile step maps one-to-one to a web event — tap ↔ click, type ↔ input, assert ↔ assert — so everything you already know carries over. The only things that change are the surface you drive (a live Android emulator embedded in Trq instead of a browser) and the engine underneath.

What you get

  • Record in a live emulator. Drive an Android emulator embedded inside Trq — tap, type, swipe, long-press — and every action becomes a robust, replayable step.
  • Selectors that self-heal. Each element is saved as a ranked ladder (resource-id → content-desc → text → …), so replay falls back automatically when one rung breaks.
  • The full action set. Launch, tap, type, gestures, checkboxes, radios, scroll-to, file upload, and document capture — see recording.
  • Assert & capture by pointing. Check an element's text or state, or pull a value into {{var.NAME}} for later steps — assertions.
  • Deterministic runs. Clear app data and auto-grant permissions before each run, then replay from step 1 — playback.
  • The same result panels. Events, Console (logcat), Network, Summary, and Timeline — plus per-step screenshots and a shareable HTML report — reading results.
  • Network capture & mocking. Inspect the app's calls and serve recorded responses on replay — network, mocking.
  • Headless in CI. Replay mobile flows from the command line, in parallel across multiple emulators — CLI.

How it fits with web

A .trq project holds both web and mobile sessions side by side. When you create a session you pick Web or Mobile; selecting a mobile session swaps the center of the studio to the emulator, and everything else — the explorer, toolbar, and bottom panels — stays the same.

A few things stay web-only

API request steps (the in-flow HTTP helper), Branch, and keyboard shortcuts are web-session features today and aren't part of a mobile flow. Everything else has a mobile equivalent documented in this section.

Get going

New to mobile? Do the Android setup once (the SDK + an emulator), then record your first mobile test — you'll go from an empty folder to a replayable Android test in about a minute.