Extract Value from Element
The Extract Value from Element feature retrieves the value of a specific element during a test and stores it in a variable for later use. This ensures dynamically generated values remain accessible and reusable throughout your test scenario.
Example
When a user signs up and receives an acknowledgment number, they may need to store it in a variable and reference it in subsequent interactions or validations to ensure test accuracy.
How to extract values from elements
You can use this feature anytime during recording in the AI Recorder.
Click the plus icon at the bottom-left corner to open the step type menu.
Select Extract Value from Element in the AI Recorder.
Click the element whose value you want to extract.
Choose the property to retrieve from options like Text, Value, Href, Src, or Alt.
NOTE
The available properties depend on the type of element you select. For example, an image element may show
src
andalt
, while a text element will showtext
.Enter a variable name to store the extracted value.
Optional
You can use Advanced Options to fine-tune the extracted value:
- You can write your own custom regular expression to extract a specific part of the value.
- Or enable commonly used regex shortcuts provided by the Recorder (such as extracting only numbers, trimming spaces, etc.).
Save the step.
The AI Recorder adds a Then step that retrieves the selected value and stores it as a runtime variable.
The extracted value appears under the Test Data section when you expand the recorder view.
You can dynamically use these variables in later steps.
When you use an extracted value in any step during scenario recording and save the scenario, the variable appears in the Examples section on the Features page.
Using Extracted Test Data
Use Extracted Data in Input Fields
Copy the extracted value from the Test Data section.
Paste it into an input field where needed.
The AI Recorder automatically references the test data variable in the input step, ensuring dynamic usage.
Use Extracted Data in Assertions
Use the extracted variable in Then steps to validate expected results instead of hardcoding values.

This approach lets your test dynamically verify UI changes based on actual runtime values.