Android
Emulators and phones, the on-device driver, and what differs from iOS.
Flows read the same on Android; the CLI does the platform work.
{
"name": "Settings: open Network & internet",
"app": { "bundleId": "com.android.settings", "platform": "android" },
"goal": "Open Network & internet",
"expectText": ["Internet"]
}What you need
An emulator or a phone with USB debugging enabled, and adb (Android Studio's platform-tools). adb devices should list the device. The CLI finds adb in the SDK under ANDROID_HOME, ANDROID_SDK_ROOT, or ~/Library/Android/sdk.
The on-device driver
The first run installs a small instrumentation APK on the device. It answers with the accessibility tree in about 20 ms, against about two seconds for uiautomator dump, which is the difference between a flow that feels instant and one that does not. It listens on the device's loopback only; the CLI reaches it through adb forward. If it cannot be installed the run still works over plain adb, just slower, and says so.
Differences from iOS
- A project tests one app on one platform, so an iOS app and its Android version are two projects;
app.platformdecides which. setup.clearDatarunspm clear, which also resets permissions;reinstalldoes the same, since there is no cached APK to reinstall from. Permission names are Android's (android.permission.CAMERAor justCAMERA).- Typing uses the accessibility set-text action, so a field gets the whole value at once.
"\n"dismisses the keyboard. --parallelis iOS-only for now; run Android flows one device at a time.--videousesscreenrecord, which caps a recording at three minutes.
Real devices
A phone with USB debugging works the same as an emulator. On iOS, real devices need the driver to be signed for the device and are not supported yet.