Skip to main content

Module scenario

Module scenario 

Source
Expand description

Automation scenarios (scenario.yaml), as run by litz-cli --scenario.

Supported steps:

  • delay: a duration string such as 500ms or 2s.
  • wait-serial: text to wait for; a scalar or {text, timeout}.
  • write-serial: text, a list of byte values, or {value: ...}.
  • wait-pin: {part-id, name?, value, timeout?}; blocks until the pin reaches the level or the timeout expires.
  • expect-pin: {part-id, value}; the pin name (name, or the older pin) is accepted, and expected is accepted for value.
  • set-control: {part-id, name|control, value}.
  • take-screenshot: a path, {path, board, expected}, or Wokwi’s {part-id, save-to, compare-with}. A PNG of that part (or of the board’s display) is written at that point in the run; a reference image is compared pixel by pixel, with tolerance per channel.
  • touch: {x, y, down} presses or releases; without down it is Wokwi’s tap, releasing after duration (default 50 ms). touch-press, touch-move and touch-release are the low-level form. Coordinates are panel pixels.

Any unknown step key is rejected when the scenario loads, so a scenario cannot silently half-run. Durations are relative to the previous step.

Structs§

Scenario
A parsed automation scenario.

Enums§

Step
One scenario step, carrying what the runner needs to execute it.