entering-text
Installation
SKILL.md
Entering Text — performTextInput, performTextReplacement, performImeAction
Compose text fields expose semantics actions for IME-style edits. The test API wraps those actions so a single call types text, replaces text, clears text, sets a selection, or fires the IME action. Every entry point auto-focuses the node when needed and asserts that the node is enabled and editable, surfacing precise errors when one of those preconditions fails.
When to use this skill
- The test types into
TextField,OutlinedTextField,BasicTextField, or any composable that exposes theInsertTextAtCursor/SetTextsemantics actions. - The test fires an IME action —
ImeAction.Nextto advance focus,ImeAction.Doneto dismiss the keyboard,ImeAction.Search/Send/Goto trigger a form submit. - The test must clear an existing value, or replace the full value with new text.
- The test asserts cursor or selection state with
performTextInputSelection(TextRange(...)).
When NOT to use this skill
- The test sends an arbitrary key shortcut into a focused field (e.g.
Ctrl+A,Tab, arrow keys). Use../injecting-mouse-and-keyboard/SKILL.md. - The test only checks the displayed text without typing — assert via
../../assertions/asserting-node-state-and-text/SKILL.md. - A finder cannot locate the text field. Verify the matcher first via
../../finders/finding-nodes-by-tag-text-content/SKILL.md. - The test asserts state restoration of the typed text after rotation. See
../../setup/configuring-test-dependencies/SKILL.mdandStateRestorationTester.