Input Text on Mobile Device
Command description
Enter text in a specified mobile element, for example to fill an input field or send a message.
Command Input Parameters
| input parameters | Input parameter type | Description |
|---|---|---|
| Mobile Device Object | Phone | Connected mobile-device object |
| Mobile Element | PhoneElement or str (captured element UID, not element name, not ms-rpa-id) | Select a captured mobile element or an element returned by Get Mobile Element, Get Similar Mobile Elements, or Get Related Mobile Elements |
| Content | str | Text to be entered |
| Append | bool | Whether to append to the existing text; default: False |
| Input Method | enum | API Input, Clipboard Input |
| Post-Execution Delay | number | Time to wait after input, in seconds |
| Element Wait Timeout | number | Maximum time to wait for the element to appear, in seconds; an error is reported when the timeout expires |
Command Output Parameters
None
Type definition reference
Input method description
| Input method | Description |
|---|---|
| API Input | Enter text through the mobile automation API. This method is suitable for ordinary input boxes. |
| Clipboard Input | Writes the text to the mobile-device clipboard, then pastes it. Use this when API Input does not work, including with some Flutter input fields |
tip
- If API input fails, try Clipboard Input first
- If input triggers suggestions, validation, or navigation, increase Delay as needed.
Operation steps
- Select the target input element.
- Enter the text.
- Run the command.
Related links
Example
tip
Enable Developer options on the mobile device, then connect it to the computer with a USB cable. See Connect Mobile Device