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 #
| Parameter | Type | Required | Values | What it does |
|---|---|---|---|---|
locator | locator | Yes | The element to read. 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. | ||
into | text | The 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 Name field into name
- Show “Name is {{name}}” for 2 s
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.