Extract value in a web test

Capture data from the page into a variable: an order number to search for, a price to compare, a generated ID to type into another form.

Capture data from the page for later use: an order number to search for, a price to compare, a generated ID to type into another form. The step reads the element's text (or its value, for form fields) and stores it in a variable.

Parameters

ParameterRequiredDescription
Target elementYes, unless a manual selector is setNatural-language description of the element to read.
Manual selectorNoXPath or CSS selector, used when AI is disabled or as the saved selector.
VariableYesName of the variable that receives the extracted value. Default: Extracted.
AI usageNoinherit (default, follows the test strategy), smart, or always.
Ignore error on this stepNoThe run continues with the next step if this one fails. Default: off.

Results and metrics

  • Variable: the element's text content (or its value, for form fields) is stored in the variable and available to every later step. Insert it anywhere a field supports variables.
  • Timing: start, end, and duration (in seconds) recorded in the step result.
  • Status: success, warning, or failed, with the error message on failure.
  • Screenshot: captured after the step runs.
  • AI usage: if the AI located the element, the healed selector is saved on the test and the AI cost is added to the run.

See Variables for how extracted values can be reused across steps.

What's next?

Fill input

Type the extracted value somewhere else

Verify with AI

Compare values on screen without extracting them

Last updated on