Skip to main content
Extracts data from the current screen, optionally validating it against a JSON schema. Store the result with saveAs to read it on env.<name> in later steps. The simplified form takes the extraction goal as a single string.

Parameters

ParameterTypeRequiredDescription
goalstringYesWhat to extract.
schemaobjectNoJSON Schema the extracted payload must conform to.
saveAsstringNoVariable to store this step’s return value on env.<name>.
retriesnumberNoTimes to retry the step on failure before failing the test.
skippedbooleanNoSkip this step at execution time.
extract fails the step when the extracted payload does not conform to schema.

Shorthand

Goal as a single string.
- extract: The discounted subtotal in the order summary

Examples

- extract:
    goal: The discounted subtotal in the order summary
    saveAs: SUBTOTAL # read later as {{ env.SUBTOTAL }}
    schema: # fail the step unless the result matches this shape
      type: object
      properties:
        amount:
          type: number
      required: [amount]