Browse the docs

Read field value

Reads the text of a field, label or other control into a variable.

Read locator into into

Details #

Finds an element and reads its value. If the element has no value, its title or description is used. The text becomes the step's output, and, when into is set, a variable with that name.

The step waits for the element to appear, up to its timeout. The element can be disabled. If the element has nothing to read, the step fails with "has no value to read".

Use it to pull a number from a window, check a status label, or copy a field without touching the clipboard.

Parameters #

ParameterTypeRequiredValuesWhat it does
locatorlocatorYesThe element to read. 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.
intotextThe name of the variable to put the text in. Without it, the text is only the step's output.

Every step also accepts label, onFailure, timeout and dryRunSafe.

Examples #

Read the Name field and show it (reads only)
Do
  1. Read Name field into name
  2. Show “Name is {{name}}” for 2 s
Open in Switchboard to try it

Gotchas #

  • A dry run skips this step unless you mark it Safe in dry run. It only reads, so that is safe to do.

  • Web content in a browser may expose little. For a web page, Run JavaScript in browser is more reliable.

See also #

Set field value, Click, Wait