inputRandom
Type random data of a chosen type into the focused field.
The inputRandom command types random data into the focused field. It is the general form of inputRandomText, inputRandomNumber, inputRandomEmail and inputRandomPersonName.
Syntax
Give the type alone, or use the map form with a length.
yaml
- inputRandom: EMAIL
# or
- inputRandom:
type: NUMBER
length: 6Parameters
| Parameter | Type | Description |
|---|---|---|
type | String | TEXT, NUMBER, EMAIL, PERSON_NAME, CITY_NAME, COLOR_NAME or COUNTRY_NAME. Case does not matter. Any other value, or none, types TEXT. |
length | Integer | Number of characters for TEXT and NUMBER. Defaults to 10. Ignored for the other types. |
Usage example
yaml
- tapOn:
id: "phone_field"
- inputRandom:
type: NUMBER
length: 9The typed value is shown in the step result. A text field must be focused first.
City, color and country names
inputRandomCityName, inputRandomColorName and inputRandomCountryName are short for inputRandom with CITY_NAME, COLOR_NAME and COUNTRY_NAME. Each picks a value from a built-in list of 12, such as Paris, Teal or Japan.
yaml
- tapOn:
id: "city_field"
- inputRandomCityName