device_type
Type text into the focused field on Android. CRITICAL: call this AFTER device_tap / device_tap_by_text completes — do NOT issue the focusing tap and this type in parallel, or the type will race the focus change and land in the previously-focused field (observed on a banking-app login: username+password concatenated into username box). method="keys" (default): decompose ASCII to keycode events (DOWN/UP with shift) — most reliable; non-ASCII chars (CJK/emoji) auto-fall-back to IME injection for that segment. method="ime": IME injection only — full UTF-8 in one shot, but Samsung IMEs intercept ./@/_ as autocomplete/action shortcuts and may trigger system gestures. method="shell": shell input text — slowest, and Samsung IME drops @/./_. Optional clearFirst wipes the field first; pressKey sends a keycode after typing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| text | Yes | Text to type | |
| udid | Yes | Device serial number (UDID) | |
| method | No | Injection method: keys | ime | shell (default: keys — most reliable for ASCII; non-ASCII auto-falls-back to IME). | |
| pressKey | No | Keycode to press AFTER typing (e.g. ENTER, TAB, SEARCH) — handles common "type then submit" flows in one call | |
| clearFirst | No | Clear the field before typing — reads its current length from the UI and sends exactly that many backspaces (default: false) |