Flutter TextField does not expose resource-id or stable element identifier in Appium Inspector

Open
#835 1 comment 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 2 days

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
android, flutter

Research direction

Start by reproducing the minimal TextField example with the listed Appium Inspector and Android automation backends, then inspect how the driver exposes Flutter semantics to Appium. No repository files or tests are named; done would require a defined stable identifier behavior and regression coverage without relying on manually added Flutter content-desc values.

Written by the indexing model from the issue text.

Description

I am testing a Flutter application using Appium, and Flutter’s TextField widget is not exposing any stable identifier when inspected.
Appium Inspector shows:

No resource-id

No accessibility-id

Only a generic android.widget.EditText

Auto-generated elementId (changes every run)

content-desc only appears if manually added in Flutter code

This makes it impossible to create stable Appium locators without modifying the Flutter source code.

Steps to Reproduce

Create a sample Flutter app with a simple TextField:

TextField();

Run the app on an Android device/emulator.

Open Appium Inspector.

Inspect the TextField.

Expected Behavior

Appium Inspector should expose at least one consistent identifier for the Flutter TextField, such as:

resource-id

or accessibility-id

or any stable property usable for UI automation

Actual Behavior

The inspected element returns:

class: android.widget.EditText
resource-id: (empty)
elementId: 00000000-0000-0541-0000-000f00000004 (auto-generated)
content-desc: (empty unless manually set)

Since Flutter does not provide native Android view IDs, the element cannot be targeted reliably from Appium.

Screenshot

(include your screenshot)

Environment

Flutter: (your version)

Appium: (your version)

Appium Inspector: (your version)

Android Device/OS: (your device + OS)

Automation backend: uiautomator2 / flutter-driver (specify if used)

Additional Notes

This behavior occurs with any Flutter TextField, even in a minimal example.
Flutter’s rendering architecture prevents Android from generating resource-ids automatically, creating limitations for Appium UI automation.

A consistent identifier would greatly improve test automation support for Flutter apps.

Image Image
Dominant language
TypeScript
Stars
541
Forks
197
Avg merge
4d 11h
Merged PRs (30d)
9

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from appium/appium-flutter-driver

All issues in appium/appium-flutter-driver

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.