inputText

Enter text into fields in Maestro, including random emails, names, or numbers with length.

Inputs text (regardless of whether any text field is currently focused or not)

- inputText: "Hello World"

Input random text

There are several convenience methods for entering a random text input:

- inputRandomEmail       # Enters a random Email address
- inputRandomPersonName  # Enters a random person name
- inputRandomNumber      # Enters a random integer number
- inputRandomText        # Enters random unstructured text

Length

You can pass length as argument for Number and Text

- inputRandomNumber:
    length: 10  #(default: 8)
- inputRandomText:
    length: 10  #(default: 8)

Re-using random input

To access and re-use your random input, you can use the copyTextFrom function, as shown in the example below.

- tapOn:
    id: MyTextInput
- inputRandomText
- copyTextFrom:
    id: MyTextInput

- tapOn: 'Submit' # Assumes a form where the input will be displayed on the next screen

- assertVisible: ${maestro.copiedText}
# or with regex
- assertVisible: ${'.*' + maestro.copiedText + '$'}
# or tapOn
- tapOn: ${maestro.copiedText}

Last updated

Was this helpful?