Skip to main content

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 parametersInput parameter typeDescription
Mobile Device ObjectPhoneConnected mobile-device object
Mobile ElementPhoneElement 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
ContentstrText to be entered
AppendboolWhether to append to the existing text; default: False
Input MethodenumAPI Input, Clipboard Input
Post-Execution DelaynumberTime to wait after input, in seconds
Element Wait TimeoutnumberMaximum 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 methodDescription
API InputEnter text through the mobile automation API. This method is suitable for ordinary input boxes.
Clipboard InputWrites 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

  1. Select the target input element.
  2. Enter the text.
  3. Run the command.

Capture Mobile Elements

Example

tip

Enable Developer options on the mobile device, then connect it to the computer with a USB cable. See Connect Mobile Device

FAQ

See Mobile Automation FAQ