browser_clear_input

Summary: Browser Clear InputPOST /api/execute/browser_clear_input

Clears all existing characters from an input, textarea, or contenteditable node while firing authentic deletion events. Directly assigning an empty string to a DOM node's value property in JavaScript often fails because React, Vue, and Angular bind state to internal value trackers and InputEvent listeners. To guarantee framework synchronization, this operation locates the control via OwlMark token, CSS query, coordinates, or semantic label, focuses the field, selects its full text range, and synthesizes a Backspace keystroke. Consequently, the control empties cleanly while emitting genuine beforeinput, input, and change notifications up the DOM tree. Invoke this before typing whenever you need to overwrite pre-populated form values.

Parameters

NameTypeRequiredDescription
context_idstringyesWorkspace handle containing the editable control whose text will be erased.
selectorstringyesEditable field identified via OwlMark token, CSS query, XxY coordinates, or semantic description.

Usage

result = await browser.clear_input(context_id=context_id, selector="#element-id")

See Also