# Actions

One page per step action.

| Action | Description |
|---|---|
| [`fill`](https://docs.kaab.ist/reference/dsl/actions/fill) | Types a value into a field. The target must be visible and editable; values typed into `type=password` fields are redacted. |
| [`click`](https://docs.kaab.ist/reference/dsl/actions/click) | Clicks an element once it is visible, enabled and not covered; an obstacle in the way is handled by the obstacle layer first. |
| [`press`](https://docs.kaab.ist/reference/dsl/actions/press) | Presses a key, named as Playwright names keys (`Enter`, `Tab`, `Control+A`). |
| [`hover`](https://docs.kaab.ist/reference/dsl/actions/hover) | Moves the mouse over an element, for menus and tooltips that open on hover. |
| [`select`](https://docs.kaab.ist/reference/dsl/actions/select) | Chooses an option of a native `<select>` element, by exactly one of `value`, `label` or `index` (lint `E001` otherwise). |
| [`check`](https://docs.kaab.ist/reference/dsl/actions/check) | Checks a checkbox or selects a radio button. |
| [`uncheck`](https://docs.kaab.ist/reference/dsl/actions/uncheck) | Unchecks a checkbox. |
| [`upload`](https://docs.kaab.ist/reference/dsl/actions/upload) | Sets the files of a file input from your organisation's uploaded assets. |
| [`scroll`](https://docs.kaab.ist/reference/dsl/actions/scroll) | Scrolls an element into view when given a target, or scrolls the page with the object form, for infinite-scroll lists. The object form needs `to` or `until`. |
| [`wait_for`](https://docs.kaab.ist/reference/dsl/actions/wait-for) | Waits until a condition holds, up to the step's `timeout_ms`, without doing anything else. |
| [`set_session`](https://docs.kaab.ist/reference/dsl/actions/set-session) | Loads the named session's storage state at this point in the program. Rarely needed; prefer `options.session`. |
| [`extract`](https://docs.kaab.ist/reference/dsl/actions/extract) | Reads data from the page with an extract schema. The last extract into `data` produces the job's result; several merge shallowly, later keys winning. |
| [`capture_response`](https://docs.kaab.ist/reference/dsl/actions/capture-response) | Waits for a network response matching `url` (and `method`), observed since the step started, and stores its parsed JSON body in a variable. Bodies are limited to 2 MB. |
| [`evaluate`](https://docs.kaab.ist/reference/dsl/actions/evaluate) | Runs your own JavaScript in the page. The healer cannot see inside it, so lint warns `W006`, and it requires a paid organisation. |
| [`paginate`](https://docs.kaab.ist/reference/dsl/actions/paginate) | Runs `extract` on each page, then follows `next`. Top-level `many: true` fields are concatenated across pages and other fields come from the first page; it stops at `max_pages`, when `stop_when` holds, when `next` is not found, or when the step's `expect` does not hold after `next`. A page whose extraction fails fails the step on that page; a `next` that breaks after some pages keeps them, with a `pagination_incomplete` warning. |
| [`download`](https://docs.kaab.ist/reference/dsl/actions/download) | Clicks a trigger, captures the file it downloads and stores it as a job artifact with the response's content type. A PDF passes the [PDF security gate](https://docs.kaab.ist/concepts/documents-and-pdfs) first: a blocked one is never stored, and the step fails with its code. |
| [`read_pdf`](https://docs.kaab.ist/reference/dsl/actions/read-pdf) | Reads the tables of a PDF the job has stored: the page the job is on when it is a PDF, or a named artifact such as a `download`'s. Cells are returned exactly as printed, as strings; a table that continues over pages is one table. The file already passed the [PDF security gate](https://docs.kaab.ist/concepts/documents-and-pdfs); nothing is fetched again. Lint warns `W010` when no earlier `goto` or `download` could have produced the PDF. |
| [`set_vars`](https://docs.kaab.ist/reference/dsl/actions/set-vars) | Sets variables from templates, as a map of variable name to template; each is readable later as `{{vars.<name>}}`. |
| [`sleep`](https://docs.kaab.ist/reference/dsl/actions/sleep) | Pauses for a fixed number of milliseconds, at most `10000`. Lint warns `W003`; a `wait_for` condition is usually better. |
| [`reload`](https://docs.kaab.ist/reference/dsl/actions/reload) | Reloads the current page. The value is always `true`. |
| [`goto`](https://docs.kaab.ist/reference/dsl/actions/goto) | Navigates the top frame to a URL, given as a template string or an object. It then waits for the page to settle (500 ms of network quiet, at most 10 s); lint warns `W001` without an `expect`. |
| [`await_input`](https://docs.kaab.ist/reference/dsl/actions/await-input) | Pauses the job as `awaiting_input` until a value such as a one-time code is supplied, then stores it in `vars.<name>`. The string form names the input. |
| [`checkpoint`](https://docs.kaab.ist/reference/dsl/actions/checkpoint) | Saves the page URL, variables and browser state so a parked or resumed job can return here. The string form is the checkpoint's name. |
| [`screenshot`](https://docs.kaab.ist/reference/dsl/actions/screenshot) | Takes a screenshot, stored as the artifact `artifacts.<name>`. The string form is the name. |
| [`when`](https://docs.kaab.ist/reference/dsl/actions/when) | Runs `do` when a condition holds and `else`, if given, when it does not. |
| [`loop_until`](https://docs.kaab.ist/reference/dsl/actions/loop-until) | Repeats `do` until a condition holds. The condition is checked before each iteration; after `max` iterations the job fails with `loop_exhausted` unless the step is `optional`. |
