Skip to content

Fill Field

Type: page-fill  ·  Package: Browser v1.0.9

Clears an input field (input or textarea) and writes the given value in one go. It’s the fast, recommended way to fill out forms: it sets the value directly, without simulating key presses.

It locates the field by its selector, waits until it’s visible, enabled and editable, clears whatever it had and sets the new value. It fires the field’s input event, but not individual keyboard events (it’s almost instant). If a page needs to react to each key (autocomplete, masks that validate as you type), use Type Text instead.

  • Works with <input>, <textarea> and editable elements (contenteditable). For <select> lists use Select Option; for checkboxes, Check / Uncheck.
  • An empty value leaves the field empty: useful to clear it.
  • Accepts a credential in value: it writes its value without it appearing in the playbook or the log (the log only says which field was filled).
ParameterTypeDefaultDescription
selectorselector—The input field to fill.
valuestring | credential—The text to write. Supports expressions (e.g. cliente["nombre"]) and credentials.
ParameterTypeDefaultDescription
pageZoanPageSession—The page session. Omit it inside a body; outside, pass the session variable (e.g. page = page).
timeoutnumber30000Maximum time in ms to wait for the element. Empty, 0 or negative: the project settings value or, if none, 30000.

This activity does not return a value.

Page Fill selector = (#usuario) value = credential("portal")["user"]
Page Fill selector = (#clave) value = credential("portal")["password"]
Page Fill selector = (#buscar) value = "invoice 2026"
Page Click selector = (#btnBuscar)
MessageCause and fix
Fill failed: Timeout 30000ms exceeded. … | matches: 0 (…)It didn’t find the field. Check the selector or wait first with Wait For.
Fill failed: … | matches: 1 (the element exists but the action did not complete: …)The field is hidden, disabled or read-only. Wait for it to be enabled.
Fill failed: Error: Element is not an <input>, <textarea> …The selector points to a container or to the label, not to the field. Capture the input.
'page' must be a ZoanPageSession.page is empty outside a body.