How to automate flutter mobile app using appium?

Viewed 1142

Currently, I am working on automating flutter mobile apps. I have successfully designed a BDD cucumber Java framework with a login script that is working well. Then I tried automating other functionalities, but I couldn’t get the mobile elements locator values into Appium Inspector. Our Team I need your input on the following points.

  1. Is it possible to automate flutter applications with the BDD Cucumber Java framework?
  2. Is it possible to inspect all mobile elements of the flutter app using the appium inspector? Do any other way to inspect flutter app elements ?
  3. Do we have any other options for automating Flutter apps?
1 Answers
  1. You can use gherkin packages available on pub.dev to automate using BDD Cucumber. The tests will be written in dart.

  2. As far as my finding, appium requires accessibility-id to interact with elements. In flutter you cannot set accessibility-id for widgets. I gave up after a few days of research. The issue is still open.

Edit: Found this as well that says semanticLabel can be used for resource-id.

  1. Flutter has its own integration test package that you can use to automate your tests. It's very easy to implement. Read more here: https://docs.flutter.dev/cookbook/testing/integration/introduction
Related