How-to

Store text (storeText)

Store text (storeText) ​

Reads the visible text of Target and stores it under the name in Value. Later steps of the same job substitute that name as <<stored:name>>.

Step model ​

action_namestoreText
GroupExpect
TargetRequired
ValueRequired (stored_name)
expected_valueUsed
TEST_ACCOUNTForbidden
Do not confuse withtoHaveText

Target/Value facts match the source-of-truth catalog and Autotest step.

Prerequisites ​

  1. The element with text is already visible.
  2. The name is not used yet in this job, or you mean to overwrite it.

Steps ​

  1. Add a storeText step.
  2. Set Target to the element whose text you want to keep.
  3. In Value enter a name: a lowercase letter, then lowercase letters, digits, or _, at most 64 characters. Do not wrap it in << >>.
  4. To keep only part of the text, put a pattern in the expected value: literals and exactly one (\d+) or ([a-z0-9_]+) group. Write parentheses around a number as \((\d+)\).
  5. Save. In a later step use <<stored:name>> inside Value or a locator.

The step is stored on the autotest. Next - neighbouring steps or autotest run creation.

Examples ​

The number on the Opened tab ​

Fields in the UI:

FieldValue
action_namestoreText
Targetkind ROLE, value tab, name Opened
Valueopened_before
value_source_typeINLINE
expected_value\((\d+)\)

Step JSON fragment (copy-paste):

json
{
  "action_name": "storeText",
  "target": {
    "kind": "ROLE",
    "value": "tab",
    "name": "Opened"
  },
  "value_text": "opened_before",
  "value_source_type": "INLINE",
  "expected_value": "\\((\\d+)\\)"
}

Common mistakes ​

  • The name in Value is not a token. Write <<stored:opened_before>> in later steps.
  • A pattern such as (a+)+ is not saved and is not executed. Literals and one (\d+) or ([a-z0-9_]+) group are allowed.
  • <<stored:…>> inside the pattern is forbidden. <<param:…>>, <<const:…>>, and <<random:…>> are checked on the substituted string when the job runs.
  • If the pattern matches nothing, the step is FAILED. If the name is not stored yet when a later step reads it, that step is ERROR and is not retried.
  • Captured text longer than 500 characters is not stored: the step is ERROR.

Screenshots ​

Screenshots of the step form for storeText will be added here in a separate pass.

Version 1.0.0 · Last updated 2026-11-24

Did this page help?