Not able to find elements for flutter apps when working on Appium Automation[Missing accessibility-id for testing purposes]

Hi,

We’d like to test our Flutter-App with Appium. To unambiguously identify the elements (text fields, buttons, …) it is necessary to provide a “technical” identifier. Searching by name (element’s label) is not a stable approach (one problem e.g. ist that the same name could be used by different elements on the view).

A stable strategy would be when we could assign an accessibility id to elements (for Android this would be the “content-desc”). Another approach would be to use the native element identifiers (resource-id for android, name for iOS). These can both not be set on the flutter elements.

This situation makes it very hard to test the app with Appium

Is there any solution to solve this problem?

Almost every widget in Flutter has a ‘key’ property. A key can be used to uniquely identify the widget. Do let us know if theta’s helpful in any way.