entering-text

Drive Jetpack Compose text input via semantics actions and IME triggers.

303|10|Updated May 15, 2026
One-click install
npx skills add https://github.com/skydoves/android-testing-skills --skill entering-text
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: entering-text
Source: https://github.com/skydoves/android-testing-skills/tree/main/compose/actions/entering-text
Command: npx skills add https://github.com/skydoves/android-testing-skills --skill entering-text

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill eliminates the friction of reliably entering text into Jetpack Compose text inputs during UI tests, especially when dealing with cursor placement, selection, clearing, and IME-triggered actions.

Core Features & Use Cases

  • TextEntry via semantics actions: Drives InsertTextAtCursor (performTextInput) and SetText (performTextReplacement / performTextClearance) on Compose text fields.
  • Cursor & selection control: Sets a TextRange with performTextInputSelection, including correct handling for transformed vs original text.
  • IME action triggering: Fires the configured non-default IME action with performImeAction to validate keyboard-driven focus chains (e.g., Next, Done, Search).

Use it when your test needs to type into TextField, OutlinedTextField, or BasicTextField, verify a clear-text behavior, test an IME Next button, or debug failures like “Failed to perform text input” / “Failed to perform IME action” / “Default ImeAction”.

Quick Start

Use entering-text to type a value into a TextField in your Compose UI test and optionally trigger its IME action as configured.

Frequently Asked Questions about entering-text

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I type text into a Jetpack Compose TextField in UI tests?

Enter text into Jetpack Compose TextField UI tests by invoking semantics actions like InsertTextAtCursor for cursor-based insertion or SetText for full text replacement, provided the field is enabled, editable, and focusable.

Why does performTextInput fail in my Compose UI test?

performTextInput fails in Compose UI tests when the text field lacks the required preconditions—enabled, editable, and focusable—or when the correct semantics actions like InsertTextAtCursor or SetText are not present on the target node.

How do I trigger an IME action like Next or Done in Compose UI tests?

Trigger an IME action like Next or Done in Compose UI tests by invoking performImeAction on the text field, which fires the configured non-default IME action to validate keyboard-driven focus chains and verifies the handler execution.

Can I control text selection and cursor placement in Compose UI tests?

Control text selection and cursor placement in Compose UI tests by setting a TextRange with performTextInputSelection, which correctly handles the distinction between transformed and original text within the Jetpack Compose text field.

What's the best way to clear text in an OutlinedTextField during a UI test?

Clear text in an OutlinedTextField during a UI test by using performTextClearance, which leverages the SetText semantics action to fully replace the existing text content with an empty value on the Compose text field.

Does performImeAction work with default IME actions in Compose?

performImeAction does not work with default IME actions in Compose; it requires a non-default IME action configuration on the text field and performs handler verification to ensure the keyboard-driven focus navigation executes correctly.