# Element.typeText

Focus an element and insert text.

```js
element.typeText(text, options?)
```

## Arguments

| Argument | Type | Meaning |
| --- | --- | --- |
| `text` | string | Text to insert. |
| `options.interval` | number | Milliseconds between Unicode code points; 0 (default) sends in one call, maximum 5000. |

## Returns

The same element.

## Example

```js
const element = UIHelper.waitForElement({id: "target", visible: true, enabled: true}, 5000);
element.typeText("Hello", {interval: 80});
```

## Notes

Interruption can leave partial text. Do not repeat the whole insertion without checking the field.

## Also available as

`Element.addValue`.

[All JavaScript APIs](https://mcp.applesauceos.com/doc/api.md) · [Automation playbook](https://mcp.applesauceos.com/doc/ai.md)
