Browse the docs

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 #

ParameterTypeRequiredValuesWhat it does
locatorlocatorYesThe element to set. Required. Select the step and press Re-record in the editor, then click the element.
valuetextYesThe text to write. Required.
apptextThe app to look in, by bundle id. Defaults to the locator's app, otherwise the front app.
fuzzyyes / noWhen 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 #

Fill the front window's text field
Do
  1. Set Name field to “Alex Morgan”
Open in Switchboard to try it

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.

See also #

Read field value, Click, Type text