Skip to main content

DSL Grammar

A DSL document is { name: string, steps: Step[] }. Every step has an action plus a subset of these fields, validated by packages/dsl/src/dsl.schema.ts:

FieldTypeMeaning
selectorstringCSS selector
valuestringNavigation URL, fill value, or wait duration depending on the action
outputKeystringKey under which the result is stored in the run's artefact
attrstringAttribute name, for extractAttr
conditionstringcontains | notContains | exists | notExists, for assert
timeoutMsnumberPer-step timeout override

Base actions

ActionRequired fields
gotovalue (the URL)
clickselector
fillselector, value
waitForselector
waitvalue (duration)
extractTextselector, outputKey
extractHtmlselector, outputKey
extractAttrselector, outputKey, attr
extractselector, outputKey
screenshotoutputKey
saveSourceoutputKey
assertselector, condition; value also required when condition is contains or notContains

This set is fixed and intentionally use-case agnostic — it never grows a site-specific verb. A Challenger extension can register additional actions; the compiler unions each extension's schema into the step type, and the registry rejects any name that collides with a base action or another extension's action.

See Write DSL Flows for a complete working example.