Set field value
Sets the value of a text field or other control directly, without typing.
Set locator to value
Details #
Finds an element and writes value into it through the accessibility interface. The text appears at once, with no key presses and no focus change. It is faster and more reliable than clicking a field and typing.
Like Click, the step waits for the element to appear and to be enabled, up to its timeout. It uses the same confidence rules: under 70% fails, 70% to 85% runs with a "low confidence" warning.
The value can use variables. It is always set as text.
Parameters #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
locator | locator | Yes | The element to set. Required. Select the step and press Re-record in the editor, then click the element. | |
value | text | Yes | The text to write. Required. | |
app | text | The app to look in, by bundle id. Defaults to the locator's app, otherwise the front app. | ||
fuzzy | yes / no | When true, a match between 40% and 70% is accepted too, with a "fuzzy match" warning. Off by default. |
Every step also accepts label, onFailure, timeout and dryRunSafe.
Examples #
- Set Name field to “Alex Morgan”
Gotchas #
A dry run skips this step. If you mark it Safe in dry run, the element is found and reported, but the value is not set.
Some apps do not notice a value changed this way until the field gets focus. If an app ignores it, use Type text.