eliminatorMP
eliminatorMP

Reputation: 111

How to set resource-id/content-desc in flutter app for automation using Appium?

To automate flutter app using Appium, we need to set the resource-id (for Android) and accessibility-Id/content-desc (for iOS) of any element/control in the flutter app. To get resource-id and accessibility-Id in the Appium tree view of flutter app, what should be done? Please help with possible solutions to achieve this.

Please refer below screenshot of Appium tree view which shows the missing resource-id.

enter image description here

Flutter version = 1.17.5

Please take a note that we have already tried "key" property of Widget for unique identification but it didn't work.

Upvotes: 7

Views: 5771

Answers (2)

Mahendra Raj
Mahendra Raj

Reputation: 455

You can check this thread for my answer.

In the thread, I'm suggesting that one could look into exploring Semantics widget with identifier attribute for UI testing.

Upvotes: 0

dmle
dmle

Reputation: 3658

You can check this thread about Flutter support for Appium.

You can use semanticLabel field, but it still feels like Flutter driver for Appium is far from stable state.

Upvotes: 2

Related Questions