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
| Parameter | Required | Description |
|---|---|---|
| Target element | Yes, unless a manual selector is set | Natural-language description of the element to read. |
| Manual selector | No | XPath or CSS selector, used when AI is disabled or as the saved selector. |
| Variable | Yes | Name of the variable that receives the extracted value. Default: Extracted. |
| AI usage | No | inherit (default, follows the test strategy), smart, or always. |
| Ignore error on this step | No | The 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?
Last updated on